
#!/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:48:12] Module name: VerifyODF
# # [INFO] [2024-11-30T23:48:12] Instrument: all
# # [INFO] [2024-11-30T23:48:12] Stream no.: 0001
# # [INFO] [2024-11-30T23:48:12] Module version number: 1.18
# # [INFO] [2024-11-30T23:48:12] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:48:12] Module name: MakeCIF
# # [INFO] [2024-11-30T23:48:12] Instrument: all
# # [INFO] [2024-11-30T23:48:12] Stream no.: 0001
# # [INFO] [2024-11-30T23:48:12] Module version number: 1.23
# # [INFO] [2024-11-30T23:48:12] Observation start defined as >2005-06-01T22:00:16.000<
# # [INFO] [2024-11-30T23:48:12] Processing date defined as >2024-12-01T00:48:12<
# [COMMAND] [2024-11-30T23:48:12]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:48:12]
export SAS_RAND_SEED=0304031201
# # [INFO] [2024-11-30T23:48:12] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304031201
# [COMMAND] [2024-11-30T23:48:12]
cifbuild analysisdate=2024-12-01T00:48:12 calindexset=product/P0304031201OBX000CALIND0000.FIT fullpath=no \
observationdate=2005-06-01T22:00:16.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:48:43]
# # [INFO] [2024-11-30T23:48:43] Task Run Time cifbuild 30.7271010875702s
#
# [COMMAND] [2024-11-30T23:48:43]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:48:43]
export SAS_RAND_SEED=0304031201
# # [INFO] [2024-11-30T23:48:43] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304031201
# [COMMAND] [2024-11-30T23:48:43]
addattribute attributecomment="\"Telescope (mission) name\" \"Observation identifier\" \"RA of instrument pointing (degrees)\" \
\"Date observations ended\" \"Observation mode (pointing or slew)\" \"Date observations were made\" \"Name of observed object\" \
\"DEC of instrument pointing\" \"Name of PI\"" attributename="TELESCOP OBS_ID RA_PNT DATE-END OBS_MODE DATE-OBS OBJECT DEC_PNT \
OBSERVER" attributetype="string string real string string string string real string" realvalue="\"184.610958\" \"29.8126667\"" \
set=product/P0304031201OBX000CALIND0000.FIT stringvalue="\"XMM\" \"0304031201\" \"2005-06-01T23:38:13.000\" \"POINTED\" \
\"2005-06-01T22:00:16.000\" \"Mkn 766\" \"Dr Tracey Jane Turner\"" -w 10
# # [OUTPUT] [2024-11-30T23:48:43]
# # [INFO] [2024-11-30T23:48:43] Task Run Time addattribute 0.0823800563812256s
#
# [COMMAND] [2024-11-30T23:48:43]
cp /scratch/226175.1.all.q/xmm/ppsprod/229320/product/P0304031201OBX000CALIND0000.FIT \
/scratch/226175.1.all.q/xmm/ppsprod/229320/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:48:43] System RV 0
# # [INFO] [2024-11-30T23:48:43] Module name: GlobalHK
# # [INFO] [2024-11-30T23:48:43] Instrument: all
# # [INFO] [2024-11-30T23:48:43] Stream no.: 0001
# # [INFO] [2024-11-30T23:48:43] Module version number: 1.81
# [COMMAND] [2024-11-30T23:48:43]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:48:43]
export SAS_RAND_SEED=0304031201
# # [INFO] [2024-11-30T23:48:43] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304031201
# [COMMAND] [2024-11-30T23:48:43]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:48:44] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056564.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is 20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056564.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056565.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056565.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056566.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056566.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056567.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056567.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056568.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 234056568.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.0000000298 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 214 times 
# # [INFO] [2024-11-30T23:48:44] Task Run Time preqgti 0.362464189529419s
#
# [COMMAND] [2024-11-30T23:48:44]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:48:44]
export SAS_RAND_SEED=0304031201
# # [INFO] [2024-11-30T23:48:44] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304031201
# [COMMAND] [2024-11-30T23:48:44]
atthkgen atthkset=product/P0304031201OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:48:44]
# # [INFO] [2024-11-30T23:48:44] Task Run Time atthkgen 0.286623954772949s
#
# [COMMAND] [2024-11-30T23:48:44]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:48:44]
export SAS_RAND_SEED=0304031201
# # [INFO] [2024-11-30T23:48:44] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304031201
# [COMMAND] [2024-11-30T23:48:44]
orbit outfile=product/P0304031201OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:48:44] orbit:- Output FITS Orbit timeseries: product/P0304031201OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:48:44] Task Run Time orbit 0.359560966491699s
#
# [COMMAND] [2024-11-30T23:48:44]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:48:44]
export SAS_RAND_SEED=0304031201
# # [INFO] [2024-11-30T23:48:44] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304031201
# [COMMAND] [2024-11-30T23:48:44]
radmonfix output=product/P0304031201OBX000RADMON0000.FIT radmonlist=odf/1003_0304031201_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:48:44] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285329.9 which\
#     is outside the time correlation data abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285333.9 which is outside the time correlation\
#     data abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285337.9 which is outside the time correlation\
#     data abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285341.9 which is outside the time correlation\
#     data abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285345.9 which is outside the time correlation\
#     data abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285349.9 which is outside the time correlation\
#     data abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285354 which is outside the time correlation data\
#     abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285358 which is outside the time correlation data\
#     abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285362 which is outside the time correlation data\
#     abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=155285365.9 which is outside the time correlation\
#     data abscissa range [155286803.9, 155294602.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 334 times 
# # [INFO] [2024-11-30T23:48:44] Task Run Time radmonfix 0.192615032196045s
#
# [COMMAND] [2024-11-30T23:48:44]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226175.1.all.q/xmm/ppsprod/229320/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:48:44] System RV 0
# # [INFO] [2024-11-30T23:48:44] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:48:44]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226175.1.all.q/xmm/ppsprod/229320/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:48:44] System RV 0
# [COMMAND] [2024-11-30T23:48:44]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226175.1.all.q/xmm/ppsprod/229320/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:48:44] System RV 0
# [COMMAND] [2024-11-30T23:48:44]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226175.1.all.q/xmm/ppsprod/229320/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:48:44] System RV 0
# # [INFO] [2024-11-30T23:48:45] Module name: ExpChooser
# # [INFO] [2024-11-30T23:48:45] Instrument: emos2
# # [INFO] [2024-11-30T23:48:45] Stream no.: 0001
# # [INFO] [2024-11-30T23:48:45] Module version number: 1.38
# # [INFO] [2024-11-30T23:48:45] Checking exposure S004 for processability
# # [INFO] [2024-11-30T23:48:45] Filter: CalClosed
# # [INFO] [2024-11-30T23:48:45] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:48:45] Exposure duration: 5877
# # [INFO] [2024-11-30T23:48:45] Exposure ignored due to invalid or unsupported filter
