
#!/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] [2022-06-02T10:59:25] Module name: VerifyODF
# # [INFO] [2022-06-02T10:59:25] Instrument: all
# # [INFO] [2022-06-02T10:59:25] Stream no.: 0001
# # [INFO] [2022-06-02T10:59:25] Module version number: 1.18
# # [INFO] [2022-06-02T10:59:25] Version of odfingest used was 3.33.1
# # [INFO] [2022-06-02T10:59:25] Module name: MakeCIF
# # [INFO] [2022-06-02T10:59:25] Instrument: all
# # [INFO] [2022-06-02T10:59:25] Stream no.: 0001
# # [INFO] [2022-06-02T10:59:25] Module version number: 1.23
# # [INFO] [2022-06-02T10:59:25] Observation start defined as >2022-05-26T18:28:06.000<
# # [INFO] [2022-06-02T10:59:25] Processing date defined as >2022-06-02T12:59:25<
# [COMMAND] [2022-06-02T10:59:25]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2022-06-02T10:59:25]
export SAS_RAND_SEED=0890410201
# # [INFO] [2022-06-02T10:59:25] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0890410201
# [COMMAND] [2022-06-02T10:59:25]
cifbuild analysisdate=2022-06-02T12:59:25 calindexset=product/P0890410201OBX000CALIND0000.FIT fullpath=no \
observationdate=2022-05-26T18:28:06.000 withccfpath=no -w 10
# # [OUTPUT] [2022-06-02T10:59:47]
# # [INFO] [2022-06-02T10:59:47] Task Run Time cifbuild 22.0328629016876s
#
# [COMMAND] [2022-06-02T10:59:47]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2022-06-02T10:59:47]
export SAS_RAND_SEED=0890410201
# # [INFO] [2022-06-02T10:59:47] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0890410201
# [COMMAND] [2022-06-02T10:59:47]
addattribute attributecomment="\"Telescope (mission) name\" \"Name of PI\" \"DEC of instrument pointing\" \"Name of observed \
object\" \"Date observations were made\" \"Observation mode (pointing or slew)\" \"Observation identifier\" \"RA of instrument \
pointing (degrees)\" \"Date observations ended\"" attributename="TELESCOP OBSERVER DEC_PNT OBJECT DATE-OBS OBS_MODE OBS_ID RA_PNT \
DATE-END" attributetype="string string real string string string string real string" realvalue="-14.2809445 157.976334" \
set=product/P0890410201OBX000CALIND0000.FIT stringvalue="\"XMM\" \"Dr Francesco Ursini\" \"HE 1029-1401\" \
\"2022-05-26T18:28:06.000\" \"POINTED\" \"0890410201\" \"2022-05-26T20:56:57.000\"" -w 10
# # [OUTPUT] [2022-06-02T10:59:47]
# # [INFO] [2022-06-02T10:59:47] Task Run Time addattribute 0.0716979503631592s
#
# [COMMAND] [2022-06-02T10:59:47]
cp /scratch/27233978.1.xmm64.q/xmm/ppsprod/152796/product/P0890410201OBX000CALIND0000.FIT \
/scratch/27233978.1.xmm64.q/xmm/ppsprod/152796/intermediate/ccf.cif
# # [INFO] [2022-06-02T10:59:47] System RV 0
# # [INFO] [2022-06-02T10:59:47] Module name: GlobalHK
# # [INFO] [2022-06-02T10:59:47] Instrument: all
# # [INFO] [2022-06-02T10:59:47] Stream no.: 0001
# # [INFO] [2022-06-02T10:59:47] Module version number: 1.78
# [COMMAND] [2022-06-02T10:59:47]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2022-06-02T10:59:47]
export SAS_RAND_SEED=0890410201
# # [INFO] [2022-06-02T10:59:47] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0890410201
# [COMMAND] [2022-06-02T10:59:47]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2022-06-02T10:59:53] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989376.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is 20.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989376.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989377.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989377.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989378.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989378.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989379.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989379.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989380.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.9999998808 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 769989380.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.9999998808 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 201138 times 
# # [INFO] [2022-06-02T10:59:53] Task Run Time preqgti 5.49878001213074s
#
# [COMMAND] [2022-06-02T10:59:53]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2022-06-02T10:59:53]
export SAS_RAND_SEED=0890410201
# # [INFO] [2022-06-02T10:59:53] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0890410201
# [COMMAND] [2022-06-02T10:59:53]
atthkgen atthkset=product/P0890410201OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2022-06-02T10:59:53]
# # [INFO] [2022-06-02T10:59:53] Task Run Time atthkgen 0.305757999420166s
#
# [COMMAND] [2022-06-02T10:59:53]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2022-06-02T10:59:53]
export SAS_RAND_SEED=0890410201
# # [INFO] [2022-06-02T10:59:53] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0890410201
# [COMMAND] [2022-06-02T10:59:53]
orbit outfile=product/P0890410201OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2022-06-02T10:59:53]
# # [INFO] [2022-06-02T10:59:53] Task Run Time orbit 0.306627988815308s
#
# [COMMAND] [2022-06-02T10:59:53]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2022-06-02T10:59:53]
export SAS_RAND_SEED=0890410201
# # [INFO] [2022-06-02T10:59:53] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0890410201
# [COMMAND] [2022-06-02T10:59:53]
radmonfix output=product/P0890410201OBX000RADMON0000.FIT radmonlist=odf/4114_0890410201_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2022-06-02T10:59:53] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274373.9 which\
#     is outside the time correlation data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with\
#     large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274377.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274381.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274385.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274389.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274393.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274397.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274401.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274405.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=241274409.9 which is outside the time correlation\
#     data abscissa range [241263589, 241274270.7] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 98 times 
# # [INFO] [2022-06-02T10:59:53] Task Run Time radmonfix 0.163825035095215s
#
# [COMMAND] [2022-06-02T10:59:53]
cp /lhome/pcms/src/pipeline/etc/EPICModes.fits \
/scratch/27233978.1.xmm64.q/xmm/ppsprod/152796/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2022-06-02T10:59:54] System RV 0
# # [INFO] [2022-06-02T10:59:54] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0008
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U008 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: emos1
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0001
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure S001 for processability
# # [INFO] [2022-06-02T10:59:54] Filter: CalClosed
# # [INFO] [2022-06-02T10:59:54] Instrument mode: PrimeFullWindow
# # [INFO] [2022-06-02T10:59:54] Exposure duration: 8726
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0009
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U009 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0013
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U013 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0001
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure S003 for processability
# # [INFO] [2022-06-02T10:59:54] Filter: CalClosed
# # [INFO] [2022-06-02T10:59:54] Instrument mode: PrimeFullWindow
# # [INFO] [2022-06-02T10:59:54] Exposure duration: 6862
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0007
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U007 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0014
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U700 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0006
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U006 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0002
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U002 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0005
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U005 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0004
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U004 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0010
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U010 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0011
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U011 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0012
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U012 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: epn
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0003
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure U003 for processability
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to lack of event files
# # [INFO] [2022-06-02T10:59:54] Module name: ExpChooser
# # [INFO] [2022-06-02T10:59:54] Instrument: emos2
# # [INFO] [2022-06-02T10:59:54] Stream no.: 0001
# # [INFO] [2022-06-02T10:59:54] Module version number: 1.38
# # [INFO] [2022-06-02T10:59:54] Checking exposure S002 for processability
# # [INFO] [2022-06-02T10:59:54] Filter: CalClosed
# # [INFO] [2022-06-02T10:59:54] Instrument mode: PrimeFullWindow
# # [INFO] [2022-06-02T10:59:54] Exposure duration: 8705
# # [INFO] [2022-06-02T10:59:54] Exposure ignored due to invalid or unsupported filter
