sede-open / synthoseis

Generating seismic data and associated labels to train deep learning networks.
MIT License
57 stars 12 forks source link

It is unclear that the name you choose for your project also has to be the name of your rpm file #3

Open gavargas22 opened 1 year ago

gavargas22 commented 1 year ago

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

klaas-koster commented 4 months 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