hyperion-rt / hyperion

Hyperion Radiative Transfer Code
http://www.hyperion-rt.org
BSD 2-Clause "Simplified" License
52 stars 26 forks source link

Improve input/output of models in Python interface #2

Closed astrofrog closed 12 years ago

astrofrog commented 12 years ago

The use of the Model() class as both input and output is a bit confusing, because at the moment certain attributes (such as grid) only work if the model is input or output, so it would be better to distinguish between model input and model output. One possibility is to have for example a ModelInput and ModelOutput class, and have a typical workflow be:

m = ModelInput('test')
...
m_out = m.run(...)

where m_out is a ModelOutput instance. One could then also do:

m_out = ModelOutput('test.rtout')

We also need to get rid of the assumption that the input and output files have the same name other than the extension, otherwise there would be no point in asking the user for an input and an output name.

astrofrog commented 12 years ago

Done!