Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_checks_compute() bugfix #837

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion phoebe/frontend/bundle.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
import subprocess
import os
import numpy as np
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be unused in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, but np is used throughout bundle and we rely on a circular import, which isn't good practice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we get it from importing all from parameters, right? (Not really a circular import... but importing * surely isn't the best, let's make a ticket for that to refactor and explicitly import things, but that definitely shouldn't happen here)


try:
from subprocess import DEVNULL
Expand Down Expand Up @@ -3753,6 +3754,7 @@ def run_checks_compute(self, compute=None, solver=None, solution=None, figure=No
all_pbs = list_passbands(full_dict=True)
online_pbs = list_online_passbands(full_dict=True)

# TODO: is this robust against flipping constraints?
aprsa marked this conversation as resolved.
Show resolved Hide resolved
pb_needs_ext = self.get_value(qualifier='ebv', context='system', **_skip_filter_checks) != 0

for pbparam in self.filter(qualifier='passband', **_skip_filter_checks).to_list():
Expand All @@ -3765,11 +3767,12 @@ def run_checks_compute(self, compute=None, solver=None, solution=None, figure=No

pb_needs_Inorm = True
pb_needs_Imu = True
pb_needs_ld = True #np.any([p.get_value()!='interp' for p in self.filter(qualifier='ld_mode', dataset=pbparam.dataset, context='dataset', **_skip_filter_checks).to_list()])
pb_needs_ld = True
pb_needs_ldint = True

missing_pb_content = []

# TODO: do we really want to run this every time we run checks? Perhaps move to init?
aprsa marked this conversation as resolved.
Show resolved Hide resolved
if pb_needs_ext and pb in ['Stromgren:u', 'Johnson:U', 'SDSS:u', 'SDSS:uprime']:
# need to check for bugfix in coefficients from 2.3.4 release
installed_timestamp = installed_pbs.get(pb, {}).get('timestamp', None)
Expand All @@ -3781,6 +3784,8 @@ def run_checks_compute(self, compute=None, solver=None, solution=None, figure=No

# NOTE: atms are not attached to datasets, but per-compute and per-component
for atmparam in self.filter(qualifier='atm', kind='phoebe', compute=computes, **_skip_filter_checks).to_list() + self.filter(qualifier='ld_coeffs_source').to_list():
if '_default' in atmparam.twig:
continue
aprsa marked this conversation as resolved.
Show resolved Hide resolved

# check to make sure passband supports the selected atm
atm = atmparam.get_value(**_skip_filter_checks)
Expand Down
Loading