Skip to content

Commit

Permalink
Catch empty string units
Browse files Browse the repository at this point in the history
  • Loading branch information
jzuhone committed Apr 18, 2017
1 parent 56ad871 commit 61c2b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyxsim/source_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def setup_model(self, data_source, redshift, spectral_norm):
ptype = None
if not isinstance(self.Zmet, float):
Z_units = str(data_source.ds._get_field_info(self.Zmet).units)
if Z_units == "dimensionless":
if Z_units == "dimensionless" or Z_units == "":
self.Zconvert = 1.0/0.019
elif Z_units == "Zsun":
self.Zconvert = 1.0
Expand Down

0 comments on commit 61c2b1b

Please sign in to comment.