
#!/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:47:07] Module name: VerifyODF
# # [INFO] [2024-11-30T23:47:07] Instrument: all
# # [INFO] [2024-11-30T23:47:07] Stream no.: 0001
# # [INFO] [2024-11-30T23:47:07] Module version number: 1.18
# # [INFO] [2024-11-30T23:47:07] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:47:07] Module name: MakeCIF
# # [INFO] [2024-11-30T23:47:07] Instrument: all
# # [INFO] [2024-11-30T23:47:07] Stream no.: 0001
# # [INFO] [2024-11-30T23:47:07] Module version number: 1.23
# # [INFO] [2024-11-30T23:47:07] Observation start defined as >2005-12-14T09:32:02.000<
# # [INFO] [2024-11-30T23:47:07] Processing date defined as >2024-12-01T00:47:07<
# [COMMAND] [2024-11-30T23:47:07]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:47:07]
export SAS_RAND_SEED=0306630301
# # [INFO] [2024-11-30T23:47:07] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306630301
# [COMMAND] [2024-11-30T23:47:07]
cifbuild analysisdate=2024-12-01T00:47:07 calindexset=product/P0306630301OBX000CALIND0000.FIT fullpath=no \
observationdate=2005-12-14T09:32:02.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:47:38]
# # [INFO] [2024-11-30T23:47:38] Task Run Time cifbuild 31.7699458599091s
#
# [COMMAND] [2024-11-30T23:47:38]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:47:38]
export SAS_RAND_SEED=0306630301
# # [INFO] [2024-11-30T23:47:38] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306630301
# [COMMAND] [2024-11-30T23:47:38]
addattribute attributecomment="\"Telescope (mission) name\" \"Name of PI\" \"DEC of instrument pointing\" \"Observation identifier\" \
\"Name of observed object\" \"Observation mode (pointing or slew)\" \"Date observations were made\" \"Date observations ended\" \"RA \
of instrument pointing (degrees)\"" attributename="TELESCOP OBSERVER DEC_PNT OBS_ID OBJECT OBS_MODE DATE-OBS DATE-END RA_PNT" \
attributetype="string string real string string string string string real" realvalue="\"11.0030556\" \"187.725417\"" \
set=product/P0306630301OBX000CALIND0000.FIT stringvalue="\"XMM\" \"Dr Ryuichi Fujimoto\" \"0306630301\" \"LBQS 1228+1116\" \
\"POINTED\" \"2005-12-14T09:32:02.000\" \"2005-12-14T10:33:22.000\"" -w 10
# # [OUTPUT] [2024-11-30T23:47:38]
# # [INFO] [2024-11-30T23:47:38] Task Run Time addattribute 0.0428130626678467s
#
# [COMMAND] [2024-11-30T23:47:38]
cp /scratch/226094.1.all.q/xmm/ppsprod/229240/product/P0306630301OBX000CALIND0000.FIT \
/scratch/226094.1.all.q/xmm/ppsprod/229240/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:47:38] System RV 0
# # [INFO] [2024-11-30T23:47:39] Module name: GlobalHK
# # [INFO] [2024-11-30T23:47:39] Instrument: all
# # [INFO] [2024-11-30T23:47:39] Stream no.: 0001
# # [INFO] [2024-11-30T23:47:39] Module version number: 1.81
# [COMMAND] [2024-11-30T23:47:39]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:47:39]
export SAS_RAND_SEED=0306630301
# # [INFO] [2024-11-30T23:47:39] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306630301
# [COMMAND] [2024-11-30T23:47:39]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:47:39] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936160.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is -31.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936160.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -31.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936161.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936161.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936162.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936162.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936163.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936163.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936164.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27.0000000298 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 250936164.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27.0000000298 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 20 times 
# # [INFO] [2024-11-30T23:47:39] Task Run Time preqgti 0.335868120193481s
#
# [COMMAND] [2024-11-30T23:47:39]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:47:39]
export SAS_RAND_SEED=0306630301
# # [INFO] [2024-11-30T23:47:39] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306630301
# [COMMAND] [2024-11-30T23:47:39]
atthkgen atthkset=product/P0306630301OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:47:39]
# # [INFO] [2024-11-30T23:47:39] Task Run Time atthkgen 0.267127990722656s
#
# [COMMAND] [2024-11-30T23:47:39]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:47:39]
export SAS_RAND_SEED=0306630301
# # [INFO] [2024-11-30T23:47:39] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306630301
# [COMMAND] [2024-11-30T23:47:39]
orbit outfile=product/P0306630301OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:47:39] orbit:- Output FITS Orbit timeseries: product/P0306630301OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:47:39] Task Run Time orbit 0.275954008102417s
#
# [COMMAND] [2024-11-30T23:47:39]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:47:39]
export SAS_RAND_SEED=0306630301
# # [INFO] [2024-11-30T23:47:39] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306630301
# [COMMAND] [2024-11-30T23:47:39]
radmonfix output=product/P0306630301OBX000RADMON0000.FIT radmonlist=odf/1101_0306630301_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:47:40] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172175973.9 which\
#     is outside the time correlation data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172175977.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172175981.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172175985.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172175989.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172175993.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172175997.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172176001.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172176005.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=172176009.9 which is outside the time correlation\
#     data abscissa range [172176179.9, 172181750.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 63 times 
# # [INFO] [2024-11-30T23:47:40] Task Run Time radmonfix 0.143486022949219s
#
# [COMMAND] [2024-11-30T23:47:40]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226094.1.all.q/xmm/ppsprod/229240/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:47:40] System RV 0
# # [INFO] [2024-11-30T23:47:40] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:47:40]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226094.1.all.q/xmm/ppsprod/229240/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:47:40] System RV 0
# [COMMAND] [2024-11-30T23:47:40]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226094.1.all.q/xmm/ppsprod/229240/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:47:40] System RV 0
# [COMMAND] [2024-11-30T23:47:40]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226094.1.all.q/xmm/ppsprod/229240/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:47:40] System RV 0
# # [INFO] [2024-11-30T23:47:40] Module name: ExpChooser
# # [INFO] [2024-11-30T23:47:40] Instrument: emos1
# # [INFO] [2024-11-30T23:47:40] Stream no.: 0001
# # [INFO] [2024-11-30T23:47:40] Module version number: 1.38
# # [INFO] [2024-11-30T23:47:40] Checking exposure S003 for processability
# # [INFO] [2024-11-30T23:47:40] Filter: CalClosed
# # [INFO] [2024-11-30T23:47:40] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:47:40] Exposure duration: 3672
# # [INFO] [2024-11-30T23:47:40] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:47:40] Module name: ExpChooser
# # [INFO] [2024-11-30T23:47:40] Instrument: emos2
# # [INFO] [2024-11-30T23:47:40] Stream no.: 0001
# # [INFO] [2024-11-30T23:47:40] Module version number: 1.38
# # [INFO] [2024-11-30T23:47:40] Checking exposure S004 for processability
# # [INFO] [2024-11-30T23:47:40] Filter: CalClosed
# # [INFO] [2024-11-30T23:47:40] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:47:40] Exposure duration: 3680
# # [INFO] [2024-11-30T23:47:40] Exposure ignored due to invalid or unsupported filter
