/Applications/20DayAuto.app is the main program for daily automated processing of Cassini data. It
is written in
AppleScript so
the stephen account must remain
logged in for it to run 20DayAuto is launched by cron from the stephen account at 5AM . It uses the
getCHEMSFiles.py script to retrieve new files from APL then runs the IDL programs phaflux and phaplot to create
text and pdf files that are transferred to the space server via webdav.
- First run getCHEMSFiles.py to get new files from APL. If there are errors send an email message to Doug and
Scott and exit.
- Delete the current 20DayAuto_events.log file and open a new one.
- Delete the temporary directory specified in temp_dir.txt if it exists. Create the temporary directory.
- Figure out which 20 day periods to update. Periods must include at least one file from newFiles.txt
[both pha and sci] and must have all files necessary in the 20-day period. Leap years and doy ≤ 5 or
doy ≥ 350 are special cases. If there is an error write to the log file. Write each new period to the
log file.
- Use those periods to update the flux file listing (newFluxList.txt), time range (newTrange.txt) and xdr file
listing (newxdrList.txt) in local_chems_files
- Run the IDL routine IDLCalls.pro which calls phaflux and phaplot to calculate flux and make plots. Set a 3
hour timeout to limit the time IDL can run. phaflux.pro needs to be able to iterate through the period
array and take the custom flux file list. Note that IDL needs XQuartz to be running
- Use pstopdf to convert the postscript files generated by phaplot to pdf files and delete the .ps files
- Use curl to put the new txt and pdf files on the space server via webdav and move the files
[flux and output] to the correct folders on the Cassini mac
- Delete the temporary folder