winter-telescope / mirar

Modular Image Reduction and Analysis Resource (MIRAR)
MIT License
7 stars 8 forks source link

[BUG] printed None and None directory made for output #362

Closed broulston closed 1 year ago

broulston commented 1 year ago

Describe the bug When running a pipeline (e.g. python -m winterdrp -p sedmv2 -c default_stellar -n 20221223) a set of None are printed in the output at the very beginning. Not sure if these are related to the MAX_N_CPUs or not.

(winter_env) ➜  winterdrp git:(main) ✗ python -m winterdrp -p sedmv2 -c default_stellar -n 20221223
None
None
None
None
None
None
None
None
Using cache /Users/benjaminroulston/Dropbox/Research/Projects/SEDMv2/OUTPUT_DATA/winterdrp_temp/tmpmag17gee
winterdrp.pipelines [l 22] - INFO - Found sedmv2 pipeline

Potentially related is the fact that sometimes temporary files are saved to a None folder in the OUTPUT_DATA_DIR instead of the expected cache directory.

To Reproduce

Run a pipeline python -m winterdrp -p sedmv2 -c default_stellar -n 20221223

virajkaram commented 1 year ago

The reason for the None printing is some stray print statements that somehow made their way to main. I've fixed this in a branch I am working on, will merge it soon.

Re the None folder, that happens when a processor is initialized without setting the night directory. Can you give some more info on what kind of temporary files are being saved in it?

broulston commented 1 year ago

Oh ok, I had searched for some print statements but hadn't found any that looked like they might be the cause. Will wait for your update!

For the None files, it seems to be from the BasePhotometryProcessor when doing the AperaturePhotometry

AA /Users/benjaminroulston/Dropbox/Research/Projects/SEDMv2/OUTPUT_DATA/None/photometry
winterdrp.processors.base_processor [l 304] - INFO - Saving to /Users/benjaminroulston/Dropbox/Research/Projects/SEDMv2/OUTPUT_DATA/None/photometry/kped_20221223_023057_ZTF22abveefy_sr_o_0000_8.resamp.fits
winterdrp.processors.base_processor [l 304] - INFO - Saving to /Users/benjaminroulston/Dropbox/Research/Projects/SEDMv2/OUTPUT_DATA/None/photometry/kped_20221223_023057_ZTF22abveefy_sr_o_0000_8.resamp.fits.unc
winterdrp.processors.photomet
virajkaram commented 1 year ago

First part (at least) solved by #369

virajkaram commented 1 year ago

@broulston can you check whether this is solved?

broulston commented 1 year ago

@broulston can you check whether this is solved?

Yes, confirm no more None printed when run, and currently no more None output directory made. Not sure if you intended to fix that, or if it is really fixed. But currently running it through as I did before it does not make that extre pipeline directory. 👍

virajkaram commented 1 year ago

Ok great. Closed by #369