Skip to content

Commit

Permalink
codestyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed Aug 27, 2024
1 parent 814dd05 commit fe87a30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions megabeast/mbmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ def __init__(self, stellar_model, dust_model):
self.physics_model[cparam]
)
elif cparam == "distance":
self.physics_model[cparam]["model"] = PhysDistanceModel(
self.physics_model[cparam]["model"] = PhysDistanceModel(
self.physics_model[cparam]
)
)
else:
raise NotImplementedError(f"{cparam} is not an allowed stellar model parameter")
raise NotImplementedError(

Check warning on line 75 in megabeast/mbmodel.py

View check run for this annotation

Codecov / codecov/patch

megabeast/mbmodel.py#L75

Added line #L75 was not covered by tests
f"{cparam} is not an allowed stellar model parameter"
)
elif cparam in self.dust_model.keys():
self.physics_model[cparam]["nsubvars"] = 1
self.physics_model[cparam]["model"] = PhysDustModel(
Expand Down
10 changes: 7 additions & 3 deletions megabeast/tools/simulate_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def gen_SimObs_from_sedgrid(
def simulate_obs(
physgrid_list,
noise_model_list,
output_catalog,
output_catalog=None,
beastinfo_list=None,
mbmodel=None,
nsim=0,
Expand Down Expand Up @@ -443,7 +443,11 @@ def simulate_obs(
simtable_list.append(simtable)

Check warning on line 443 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L443

Added line #L443 was not covered by tests

# stack all the tables into one and write it out
vstack(simtable_list).write(output_catalog, overwrite=True)
fincat = vstack(simtable_list)
if output_catalog is not None:
fincat.write(output_catalog, overwrite=True)

Check warning on line 448 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L446-L448

Added lines #L446 - L448 were not covered by tests

return fincat

Check warning on line 450 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L450

Added line #L450 was not covered by tests


def main():
Expand Down Expand Up @@ -522,7 +526,7 @@ def main():
simulate_obs(

Check warning on line 526 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L526

Added line #L526 was not covered by tests
args.physgrid_list,
args.noise_model_list,
args.output_catalog,
output_catalog=args.output_catalog,
beastinfo_list=args.beastinfo_list,
mbmodel=mbmodel,
nsim=args.nsim,
Expand Down

0 comments on commit fe87a30

Please sign in to comment.