pypeit / PypeIt-development-suite

8 stars 11 forks source link

Script to generate Cooked folder #67

Closed profxj closed 5 years ago

profxj commented 5 years ago

Adds some order (hopefully) to the generation of the Cooked folder.

This script copies in files from the Dev suite and can update the version number as well.

I now recommend we remove the Cooked folder on the Drive. Only the tarball is offiical.

jhennawi commented 5 years ago

I love that we have this new script. Thanks for doing that. What is the logic behind the tarball. Can we not just sym link the Cooked directory to the Google Drive directory. With the understanding that we run this script before testing to generate a new cooked.

Do you think the tarball is more robust?

jhennawi commented 5 years ago

The script crashes on my end because a file is missing. I've commented out that file, since it (the fits table) is not produced automatically by the pypeit_test script.

qsolaptop:joe% ./build_cooked Generated/over-wrote Cooked/MF_shane_kast_blue/MasterTrace_A_01_aa.json Generated/over-wrote Cooked/MF_shane_kast_blue/MasterWaveCalib_A_01_aa.json Generated/over-wrote Cooked/MF_shane_kast_blue/MasterSensFunc_A_aa.fits Generated/over-wrote Cooked/MF_shane_kast_blue/MasterTrace_A_01_aa.fits.gz Generated/over-wrote Cooked/MF_shane_kast_blue/MasterTilts_A_01_aa.fits Generated/over-wrote Cooked/MF_shane_kast_blue/MasterPixelFlat_A_01_aa.fits Generated/over-wrote Cooked/MF_shane_kast_blue/MasterArc_A_01_aa.fits Generated/over-wrote Cooked/MF_shane_kast_blue/MasterBias_A_01_aa.fits Generated/over-wrote Cooked/MF_shane_kast_blue/MasterIllumFlat_A_01_aa.fits Generated/over-wrote Cooked/MF_shane_kast_blue/MasterWave_A_01_aa.fits Traceback (most recent call last): File "./build_cooked", line 210, in main() File "./build_cooked", line 75, in main copy_me(new_file, cooked_file) File "./build_cooked", line 205, in copy_me shutil.copy2(new_file, cooked_file) File "/Users/joe/anaconda3/lib/python3.6/shutil.py", line 257, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/Users/joe/anaconda3/lib/python3.6/shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: './REDUX_OUT/Shane_Kast_blue/600_4310_d55/shane_kast_blue_setup_A/shane_kast_blue_setup_A.fits'

jhennawi commented 5 years ago

1) Can you add something to the script where it moves the old cooked to Cooked_old. 2) Can you have the script executes the the tar and gz operation. 3) Should we make the version a required argument?