
#!/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] [2021-05-13T12:25:53] Module name: VerifyODF
# # [INFO] [2021-05-13T12:25:53] Instrument: all
# # [INFO] [2021-05-13T12:25:53] Stream no.: 0001
# # [INFO] [2021-05-13T12:25:53] Module version number: 1.18
# # [INFO] [2021-05-13T12:25:53] Version of odfingest used was 3.32.1
# # [INFO] [2021-05-13T12:25:53] Module name: MakeCIF
# # [INFO] [2021-05-13T12:25:53] Instrument: all
# # [INFO] [2021-05-13T12:25:53] Stream no.: 0001
# # [INFO] [2021-05-13T12:25:53] Module version number: 1.23
# # [INFO] [2021-05-13T12:25:53] Observation start defined as >2021-05-04T20:24:47.000<
# # [INFO] [2021-05-13T12:25:53] Processing date defined as >2021-05-13T14:25:52<
# [COMMAND] [2021-05-13T12:25:53]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2021-05-13T12:25:53]
export SAS_RAND_SEED=862260501
# # [INFO] [2021-05-13T12:25:53] ## DEBUG ModuleResources: SAS_RAND_SEED set: 862260501
# [COMMAND] [2021-05-13T12:25:53]
cifbuild analysisdate=2021-05-13T14:25:52 calindexset=product/P0862260501OBX000CALIND0000.FIT fullpath=no \
observationdate=2021-05-04T20:24:47.000 withccfpath=no -w 10
# # [OUTPUT] [2021-05-13T12:26:17]
# # [INFO] [2021-05-13T12:26:17] Task Run Time cifbuild 24.539605140686s
#
# [COMMAND] [2021-05-13T12:26:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2021-05-13T12:26:17]
export SAS_RAND_SEED=862260501
# # [INFO] [2021-05-13T12:26:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 862260501
# [COMMAND] [2021-05-13T12:26:17]
addattribute attributecomment="\"Telescope (mission) name\" \"Observation identifier\" \"Date observations ended\" \"Name of \
observed object\" \"Date observations were made\" \"DEC of instrument pointing\" \"RA of instrument pointing (degrees)\" \
\"Observation mode (pointing or slew)\" \"Name of PI\"" attributename="TELESCOP OBS_ID DATE-END OBJECT DATE-OBS DEC_PNT RA_PNT \
OBS_MODE OBSERVER" attributetype="string string string string string real real string string" realvalue="\"29.9654167\" \
\"141.9331665\"" set=product/P0862260501OBX000CALIND0000.FIT stringvalue="\"XMM\" \"0862260501\" \"2021-05-04T21:20:13.000\" \"IC \
2476\" \"2021-05-04T20:24:47.000\" \"POINTED\" \"Dr Wenhao Liu\"" -w 10
# # [OUTPUT] [2021-05-13T12:26:17]
# # [INFO] [2021-05-13T12:26:17] Task Run Time addattribute 0.0907270908355713s
#
# [COMMAND] [2021-05-13T12:26:17]
cp /scratch/24164568.1.xmm64.q/xmm/ppsprod/151275/product/P0862260501OBX000CALIND0000.FIT \
/scratch/24164568.1.xmm64.q/xmm/ppsprod/151275/intermediate/ccf.cif
# # [INFO] [2021-05-13T12:26:17] System RV 0
# # [INFO] [2021-05-13T12:26:17] Module name: GlobalHK
# # [INFO] [2021-05-13T12:26:17] Instrument: all
# # [INFO] [2021-05-13T12:26:17] Stream no.: 0001
# # [INFO] [2021-05-13T12:26:17] Module version number: 1.78
# [COMMAND] [2021-05-13T12:26:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2021-05-13T12:26:17]
export SAS_RAND_SEED=862260501
# # [INFO] [2021-05-13T12:26:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 862260501
# [COMMAND] [2021-05-13T12:26:17]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2021-05-13T12:26:23] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546901.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is -31 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546901.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -31 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546902.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546902.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546903.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546903.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546904.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546904.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546905.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 736546905.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 159444 times 
# # [INFO] [2021-05-13T12:26:23] Task Run Time preqgti 5.69451379776001s
#
# [COMMAND] [2021-05-13T12:26:23]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2021-05-13T12:26:23]
export SAS_RAND_SEED=862260501
# # [INFO] [2021-05-13T12:26:23] ## DEBUG ModuleResources: SAS_RAND_SEED set: 862260501
# [COMMAND] [2021-05-13T12:26:23]
atthkgen atthkset=product/P0862260501OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2021-05-13T12:26:23]
# # [INFO] [2021-05-13T12:26:23] Task Run Time atthkgen 0.221993923187256s
#
# [COMMAND] [2021-05-13T12:26:23]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2021-05-13T12:26:23]
export SAS_RAND_SEED=862260501
# # [INFO] [2021-05-13T12:26:23] ## DEBUG ModuleResources: SAS_RAND_SEED set: 862260501
# [COMMAND] [2021-05-13T12:26:23]
orbit outfile=product/P0862260501OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2021-05-13T12:26:24]
# # [INFO] [2021-05-13T12:26:24] Task Run Time orbit 0.223458051681519s
#
# [COMMAND] [2021-05-13T12:26:24]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2021-05-13T12:26:24]
export SAS_RAND_SEED=862260501
# # [INFO] [2021-05-13T12:26:24] ## DEBUG ModuleResources: SAS_RAND_SEED set: 862260501
# [COMMAND] [2021-05-13T12:26:24]
radmonfix output=product/P0862260501OBX000RADMON0000.FIT radmonlist=odf/3920_0862260501_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2021-05-13T12:26:24] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839589.9 which\
#     is outside the time correlation data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839593.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839597.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839601.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839605.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839609.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839613.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839617.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839621.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=207839625.9 which is outside the time correlation\
#     data abscissa range [207834207.5, 207839486.4] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 82 times 
# # [INFO] [2021-05-13T12:26:24] Task Run Time radmonfix 0.250072956085205s
#
# [COMMAND] [2021-05-13T12:26:24]
cp /lhome/pcms/pipeline/etc/EPICModes.fits \
/scratch/24164568.1.xmm64.q/xmm/ppsprod/151275/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2021-05-13T12:26:24] System RV 0
# # [INFO] [2021-05-13T12:26:24] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# # [INFO] [2021-05-13T12:26:24] Module name: ExpChooser
# # [INFO] [2021-05-13T12:26:24] Instrument: emos1
# # [INFO] [2021-05-13T12:26:24] Stream no.: 0001
# # [INFO] [2021-05-13T12:26:24] Module version number: 1.38
# # [INFO] [2021-05-13T12:26:24] Checking exposure S001 for processability
# # [INFO] [2021-05-13T12:26:24] Filter: CalClosed
# # [INFO] [2021-05-13T12:26:24] Instrument mode: PrimeFullWindow
# # [INFO] [2021-05-13T12:26:24] Exposure duration: 3326
# # [INFO] [2021-05-13T12:26:24] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2021-05-13T12:26:24] Module name: ExpChooser
# # [INFO] [2021-05-13T12:26:24] Instrument: emos2
# # [INFO] [2021-05-13T12:26:24] Stream no.: 0001
# # [INFO] [2021-05-13T12:26:24] Module version number: 1.38
# # [INFO] [2021-05-13T12:26:24] Checking exposure S002 for processability
# # [INFO] [2021-05-13T12:26:24] Filter: CalClosed
# # [INFO] [2021-05-13T12:26:24] Instrument mode: PrimeFullWindow
# # [INFO] [2021-05-13T12:26:24] Exposure duration: 3304
# # [INFO] [2021-05-13T12:26:24] Exposure ignored due to invalid or unsupported filter
