AstarVienna / METIS_Simulations

Scripts for simulating METIS with ScopeSim
1 stars 0 forks source link

Add crude raw data script #4

Closed teutoburg closed 7 months ago

teutoburg commented 7 months ago

Add a simple CLI wrapper to parameterize running some basic ScopeSim simulations for raw METIS data. See the script's help message for details on intended usage.

There is a possibility to use Poetry to register the script as a CLI entry point to facilitate easier calling of the script (not creating a package, but rather a "CLI application"). However, this would require a new PyPI release for ScopeSim, unless we would add ScopeSim as a "git-based dependency", which is also possible.

teutoburg commented 7 months ago

This is addressing some parts in #3, but not all of it...

hugobuddel commented 7 months ago

It's fine to remove lm_image_sci_raw.py, but that file did actually produce a FITS file when ran as-is. The new file raw_script.py does create anything when ran, it produces an error even. The new script requires some other script that calls it with the right arguments. That other script should also be part of this repository.

In fact, for me, that missing script, the one that specifies the actual numbers and settings to use, what filenames, which directories, etc, is the main purpose of this repository. The logic of creating simulations from those numbers etc, should be in a more general repository, like ScopeSim, the IRDB, or ScopeSim_Templates.

So could you please add a shell script that creates the (approximate) file that lm_image_sci_raw.py would produce?

Then we can expand on that shell script to include the other simulations in #3.

By the way, I personally think that having everything in Python is good enough. As in, I don't see what adding a command-line layer adds. I'd rather call Python functions from Python than calling Python scripts from bash. It is fine if you prefer things this way though.

hugobuddel commented 7 months ago

Ah, there used to be some instructions on how to run the script in https://github.com/AstarVienna/METIS_Simulations/commit/ee81fcf0fe5302888ecbdd023243f886729825ec , but that commit was force pushed away (but you can't push @hugobuddel away!)

Something like that might be good enough for now. Better to make it a shell script maybe.

(Neither command works for me, but that's besides the point, maybe that's why the file is deleted.)

teutoburg commented 7 months ago

I added a simpler script that uses the same core function to run the simulations, but takes the keywords and modes (and also the date) from a YAML file, which is basically a machine-readable form of that Google spreadsheet thingy (or parts of it anyway). I'd still keep the other CLI script around, but first move ahead with the YAML-based version.