snfactory / cubefit

Fit supernova + galaxy model on a SNFactory spectral data cube
MIT License
5 stars 5 forks source link

Filenames for plots #11

Closed kbarbary closed 9 years ago

kbarbary commented 9 years ago

@nicolaschotard What are the requirements for how plot files should be named for deploying on the CC? Should the caller be able to specify the full name of every plot, via a config file?

Currently, cubefit-plot works by taking a plot prefix, and cubefit determines the suffix for each of the different plots it makes. For example, the caller can specify that the prefix should be /path/to/dir/PTF09fox_B and then plots

/path/to/dir/PTF09fox_B_epoch00.png
/path/to/dir/PTF09fox_B_epoch01.png
/path/to/dir/PTF09fox_B_epoch02.png
...

will be created.

ycopin commented 9 years ago

No need for too high a flexibility using a config file (or use reasonable defaults). The name of the output figures will be hard-coded in the plan for registration in the DB, so don't use too complex a name scheme.

kbarbary commented 9 years ago

OK, we'll stick with the current behavior for now. Determining the output names in the plan file should just be a matter of:

outputnames = ["{0}_epoch{1:02d}.png".format(prefix, i) for i in len(inputnames)]