Open gavargas22 opened 1 year ago
Good point, so let's change the code to something like:
def select_rpm(cfg): if cfg.project == "example": from rockphysics.rpm_example import RPMExample print("Using the example RPM")
rpm = RPMExample(cfg)
elif cfg.project == "abc":
from rockphysics.rpm_abc import RPMExample
print("Using the abcRPM")
rpm = RPMExample(cfg)
else:
print("No rock property model defined in select_rpm")
print("Exiting code")
sys.exit(1)
return rpm
144 Rockrproperty models
When a user names a project say:
example1
and the software attempts to load a rock property model it fails if an rpm file does not exist with same name as the project