
#!/bin/sh
if [ ! "$SAS_ODFDIR" ]; then
echo ""
echo "Please set the SAS_ODFDIR environment variable to point at the directory"
echo "containing the ODF files for this observation."
echo ""
exit 1
fi
# # [INFO] [2024-11-30T23:49:51] Module name: VerifyODF
# # [INFO] [2024-11-30T23:49:51] Instrument: all
# # [INFO] [2024-11-30T23:49:51] Stream no.: 0001
# # [INFO] [2024-11-30T23:49:51] Module version number: 1.18
# # [INFO] [2024-11-30T23:49:51] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:49:51] Module name: MakeCIF
# # [INFO] [2024-11-30T23:49:51] Instrument: all
# # [INFO] [2024-11-30T23:49:51] Stream no.: 0001
# # [INFO] [2024-11-30T23:49:51] Module version number: 1.23
# # [INFO] [2024-11-30T23:49:51] Observation start defined as >2010-11-13T18:39:57.000<
# # [INFO] [2024-11-30T23:49:51] Processing date defined as >2024-12-01T00:49:50<
# [COMMAND] [2024-11-30T23:49:51]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:49:51]
export SAS_RAND_SEED=0652510201
# # [INFO] [2024-11-30T23:49:51] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0652510201
# [COMMAND] [2024-11-30T23:49:51]
cifbuild analysisdate=2024-12-01T00:49:50 calindexset=product/P0652510201OBX000CALIND0000.FIT fullpath=no \
observationdate=2010-11-13T18:39:57.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:50:19]
# # [INFO] [2024-11-30T23:50:19] Task Run Time cifbuild 28.515016078949s
#
# [COMMAND] [2024-11-30T23:50:19]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:19]
export SAS_RAND_SEED=0652510201
# # [INFO] [2024-11-30T23:50:19] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0652510201
# [COMMAND] [2024-11-30T23:50:19]
addattribute attributecomment="\"Telescope (mission) name\" \"Name of PI\" \"DEC of instrument pointing\" \"RA of instrument \
pointing (degrees)\" \"Date observations ended\" \"Observation identifier\" \"Observation mode (pointing or slew)\" \"Date \
observations were made\" \"Name of observed object\"" attributename="TELESCOP OBSERVER DEC_PNT RA_PNT DATE-END OBS_ID OBS_MODE \
DATE-OBS OBJECT" attributetype="string string real real string string string string string" realvalue="-46.2981389 133.00575" \
set=product/P0652510201OBX000CALIND0000.FIT stringvalue="\"XMM\" \"Prof Jules Halpern\" \"2010-11-13T19:15:08.000\" \"0652510201\" \
\"POINTED\" \"2010-11-13T18:39:57.000\" \"Vela Jr. CCO\"" -w 10
# # [OUTPUT] [2024-11-30T23:50:19]
# # [INFO] [2024-11-30T23:50:19] Task Run Time addattribute 0.0444800853729248s
#
# [COMMAND] [2024-11-30T23:50:19]
cp /scratch/226316.1.all.q/xmm/ppsprod/229461/product/P0652510201OBX000CALIND0000.FIT \
/scratch/226316.1.all.q/xmm/ppsprod/229461/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:50:19] System RV 0
# # [INFO] [2024-11-30T23:50:19] Module name: GlobalHK
# # [INFO] [2024-11-30T23:50:19] Instrument: all
# # [INFO] [2024-11-30T23:50:19] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:19] Module version number: 1.81
# [COMMAND] [2024-11-30T23:50:19]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:19]
export SAS_RAND_SEED=0652510201
# # [INFO] [2024-11-30T23:50:19] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0652510201
# [COMMAND] [2024-11-30T23:50:19]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:50:22] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063002.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is 20.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063002.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063003.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063003.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063004.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063004.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063005.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063005.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063006.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.9999999404 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 406063006.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.9999999404 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 171302 times 
# # [INFO] [2024-11-30T23:50:22] Task Run Time preqgti 2.98303604125977s
#
# [COMMAND] [2024-11-30T23:50:22]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:22]
export SAS_RAND_SEED=0652510201
# # [INFO] [2024-11-30T23:50:22] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0652510201
# [COMMAND] [2024-11-30T23:50:22]
atthkgen atthkset=product/P0652510201OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:50:22]
# # [INFO] [2024-11-30T23:50:22] Task Run Time atthkgen 0.12096905708313s
#
# [COMMAND] [2024-11-30T23:50:22]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:22]
export SAS_RAND_SEED=0652510201
# # [INFO] [2024-11-30T23:50:22] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0652510201
# [COMMAND] [2024-11-30T23:50:22]
orbit outfile=product/P0652510201OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:50:22] orbit:- Output FITS Orbit timeseries: product/P0652510201OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:50:22] Task Run Time orbit 0.127158164978027s
#
# [COMMAND] [2024-11-30T23:50:22]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:22]
export SAS_RAND_SEED=0652510201
# # [INFO] [2024-11-30T23:50:22] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0652510201
# [COMMAND] [2024-11-30T23:50:22]
radmonfix output=product/P0652510201OBX000RADMON0000.FIT radmonlist="odf/2002_0652510201_RMX00100ECX.FIT \
odf/2002_0652510201_RMX00200ECX.FIT" withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:50:23] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294841.9 which\
#     is outside the time correlation data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294845.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294849.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294853.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294857.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294861.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294865.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294869.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294873.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=327294877.9 which is outside the time correlation\
#     data abscissa range [327295564.2, 327299339.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Adding 1152 counts rows from row 323
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 471 times 
# # [INFO] [2024-11-30T23:50:23] Task Run Time radmonfix 0.101092100143433s
#
# [COMMAND] [2024-11-30T23:50:23]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226316.1.all.q/xmm/ppsprod/229461/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:50:23] System RV 0
# # [INFO] [2024-11-30T23:50:23] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:50:23]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226316.1.all.q/xmm/ppsprod/229461/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:50:23] System RV 0
# [COMMAND] [2024-11-30T23:50:23]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226316.1.all.q/xmm/ppsprod/229461/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:50:23] System RV 0
# [COMMAND] [2024-11-30T23:50:23]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226316.1.all.q/xmm/ppsprod/229461/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:50:23] System RV 0
# # [INFO] [2024-11-30T23:50:23] Module name: ExpChooser
# # [INFO] [2024-11-30T23:50:23] Instrument: emos1
# # [INFO] [2024-11-30T23:50:23] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:23] Module version number: 1.38
# # [INFO] [2024-11-30T23:50:23] Checking exposure S001 for processability
# # [INFO] [2024-11-30T23:50:23] Filter: CalClosed
# # [INFO] [2024-11-30T23:50:23] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:50:23] Exposure duration: 2110
# # [INFO] [2024-11-30T23:50:23] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:50:23] Module name: ExpChooser
# # [INFO] [2024-11-30T23:50:23] Instrument: emos2
# # [INFO] [2024-11-30T23:50:23] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:23] Module version number: 1.38
# # [INFO] [2024-11-30T23:50:23] Checking exposure S002 for processability
# # [INFO] [2024-11-30T23:50:23] Filter: CalClosed
# # [INFO] [2024-11-30T23:50:23] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:50:23] Exposure duration: 2108
# # [INFO] [2024-11-30T23:50:23] Exposure ignored due to invalid or unsupported filter
