
#!/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] [2020-10-05T08:00:04] Module name: VerifyODF
# # [INFO] [2020-10-05T08:00:04] Instrument: all
# # [INFO] [2020-10-05T08:00:04] Stream no.: 0001
# # [INFO] [2020-10-05T08:00:04] Module version number: 1.18
# # [INFO] [2020-10-05T08:00:04] Version of odfingest used was 3.32.1
# # [INFO] [2020-10-05T08:00:04] Module name: MakeCIF
# # [INFO] [2020-10-05T08:00:04] Instrument: all
# # [INFO] [2020-10-05T08:00:04] Stream no.: 0001
# # [INFO] [2020-10-05T08:00:04] Module version number: 1.23
# # [INFO] [2020-10-05T08:00:04] Observation start defined as >2020-09-23T11:23:44.000<
# # [INFO] [2020-10-05T08:00:04] Processing date defined as >2020-10-05T10:00:03<
# [COMMAND] [2020-10-05T08:00:04]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:04]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:04] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:04]
cifbuild analysisdate=2020-10-05T10:00:03 calindexset=product/P0871010201OBX000CALIND0000.FIT fullpath=no \
observationdate=2020-09-23T11:23:44.000 withccfpath=no -w 10
# # [OUTPUT] [2020-10-05T08:00:22]
# # [INFO] [2020-10-05T08:00:22] Task Run Time cifbuild 18.6618928909302s
#
# [COMMAND] [2020-10-05T08:00:22]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:22]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:22] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:22]
addattribute attributecomment="\"Telescope (mission) name\" \"Observation mode (pointing or slew)\" \"Observation identifier\" \
\"Name of observed object\" \"Date observations ended\" \"Name of PI\" \"Date observations were made\" \"DEC of instrument \
pointing\" \"RA of instrument pointing (degrees)\"" attributename="TELESCOP OBS_MODE OBS_ID OBJECT DATE-END OBSERVER DATE-OBS \
DEC_PNT RA_PNT" attributetype="string string string string string string string real real" realvalue="-54.7780556 59.623125" \
set=product/P0871010201OBX000CALIND0000.FIT stringvalue="\"XMM\" \"POINTED\" \"0871010201\" \"Nova Ret 2020\" \
\"2020-09-23T13:34:46.000\" \"Dr Kirill Sokolovsky\" \"2020-09-23T11:23:44.000\"" -w 10
# # [OUTPUT] [2020-10-05T08:00:23]
# # [INFO] [2020-10-05T08:00:23] Task Run Time addattribute 0.106848955154419s
#
# [COMMAND] [2020-10-05T08:00:23]
cp /scratch/19921130.1.xmm64.q/xmm/ppsprod/149313/product/P0871010201OBX000CALIND0000.FIT \
/scratch/19921130.1.xmm64.q/xmm/ppsprod/149313/intermediate/ccf.cif
# # [INFO] [2020-10-05T08:00:23] System RV 0
# # [INFO] [2020-10-05T08:00:23] Module name: GlobalHK
# # [INFO] [2020-10-05T08:00:23] Instrument: all
# # [INFO] [2020-10-05T08:00:23] Stream no.: 0001
# # [INFO] [2020-10-05T08:00:23] Module version number: 1.77
# [COMMAND] [2020-10-05T08:00:23]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:23]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:23] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:23]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2020-10-05T08:00:25] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257211.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is 20.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257211.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257212.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257212.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257213.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257213.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257214.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257214.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257215.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.0000001192 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 717257215.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.0000001192 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 52612 times 
# # [INFO] [2020-10-05T08:00:25] Task Run Time preqgti 2.10026812553406s
#
# [COMMAND] [2020-10-05T08:00:25]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:25]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:25] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:25]
atthkgen atthkset=product/P0871010201OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2020-10-05T08:00:25]
# # [INFO] [2020-10-05T08:00:25] Task Run Time atthkgen 0.46030592918396s
#
# [COMMAND] [2020-10-05T08:00:25]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:25]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:25] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:25]
orbit outfile=product/P0871010201OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2020-10-05T08:00:26]
# # [INFO] [2020-10-05T08:00:26] Task Run Time orbit 0.445050954818726s
#
# [COMMAND] [2020-10-05T08:00:26]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:26]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:26] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:26]
radmonfix output=product/P0871010201OBX000RADMON0000.FIT radmonlist=odf/3808_0871010201_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2020-10-05T08:00:26] radmonfix:- Setting DATE-END... 
# # [INFO] [2020-10-05T08:00:26] Task Run Time radmonfix 0.332096099853516s
#
# [COMMAND] [2020-10-05T08:00:26]
cp /lhome/pcms/pipeline/etc/EPICModes.fits \
/scratch/19921130.1.xmm64.q/xmm/ppsprod/149313/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2020-10-05T08:00:26] System RV 0
# # [INFO] [2020-10-05T08:00:26] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: epn
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0005
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure U005 for processability
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: epn
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0002
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure U002 for processability
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: emos1
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0001
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure S001 for processability
# # [INFO] [2020-10-05T08:00:26] Filter: CalClosed
# # [INFO] [2020-10-05T08:00:26] Instrument mode: PrimeFullWindow
# # [INFO] [2020-10-05T08:00:26] Exposure duration: 7661
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: epn
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0008
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure U008 for processability
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: emos2
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0001
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure S002 for processability
# # [INFO] [2020-10-05T08:00:26] Filter: CalClosed
# # [INFO] [2020-10-05T08:00:26] Instrument mode: PrimeFullWindow
# # [INFO] [2020-10-05T08:00:26] Exposure duration: 7640
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: epn
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0001
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure S003 for processability
# # [INFO] [2020-10-05T08:00:26] Filter: CalClosed
# # [INFO] [2020-10-05T08:00:26] Instrument mode: PrimeFullWindow
# # [INFO] [2020-10-05T08:00:26] Exposure duration: 5796
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: epn
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0009
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure U009 for processability
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: epn
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0006
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure U006 for processability
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:26] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:26] Instrument: epn
# # [INFO] [2020-10-05T08:00:26] Stream no.: 0007
# # [INFO] [2020-10-05T08:00:26] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:26] Checking exposure U007 for processability
# # [INFO] [2020-10-05T08:00:26] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:27] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:27] Instrument: epn
# # [INFO] [2020-10-05T08:00:27] Stream no.: 0004
# # [INFO] [2020-10-05T08:00:27] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:27] Checking exposure U004 for processability
# # [INFO] [2020-10-05T08:00:27] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:27] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:27] Instrument: epn
# # [INFO] [2020-10-05T08:00:27] Stream no.: 0003
# # [INFO] [2020-10-05T08:00:27] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:27] Checking exposure U003 for processability
# # [INFO] [2020-10-05T08:00:27] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:27] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:27] Instrument: epn
# # [INFO] [2020-10-05T08:00:27] Stream no.: 0010
# # [INFO] [2020-10-05T08:00:27] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:27] Checking exposure U010 for processability
# # [INFO] [2020-10-05T08:00:27] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:27] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:27] Instrument: epn
# # [INFO] [2020-10-05T08:00:27] Stream no.: 0013
# # [INFO] [2020-10-05T08:00:27] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:27] Checking exposure U013 for processability
# # [INFO] [2020-10-05T08:00:27] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:27] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:27] Instrument: epn
# # [INFO] [2020-10-05T08:00:27] Stream no.: 0011
# # [INFO] [2020-10-05T08:00:27] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:27] Checking exposure U011 for processability
# # [INFO] [2020-10-05T08:00:27] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:27] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:27] Instrument: epn
# # [INFO] [2020-10-05T08:00:27] Stream no.: 0012
# # [INFO] [2020-10-05T08:00:27] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:27] Checking exposure U012 for processability
# # [INFO] [2020-10-05T08:00:27] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:27] Module name: ExpChooser
# # [INFO] [2020-10-05T08:00:27] Instrument: epn
# # [INFO] [2020-10-05T08:00:27] Stream no.: 0014
# # [INFO] [2020-10-05T08:00:27] Module version number: 1.38
# # [INFO] [2020-10-05T08:00:27] Checking exposure U700 for processability
# # [INFO] [2020-10-05T08:00:27] Exposure ignored due to lack of event files
# # [INFO] [2020-10-05T08:00:27] Module name: StampKeywords
# # [INFO] [2020-10-05T08:00:27] Instrument: all
# # [INFO] [2020-10-05T08:00:27] Stream no.: 0001
# # [INFO] [2020-10-05T08:00:27] Module version number: 2.08
# # [INFO] [2020-10-05T08:00:27] Getting ODS version from file\
#     /scratch/19921130.1.xmm64.q/xmm/ppsprod/149313/odf/3808_0871010201_SCX00000TCS.FIT
# [COMMAND] [2020-10-05T08:00:27]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:27]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:27] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:27]
addattribute attributecomment="\"Pipeline sequence\" \"Satellite Revolution Number\" \"Processing date\" \"Processing revision\" \
\"PPS configuration\" \"SAS version used in pipeline processing\" \"ODS version\" \"Origin of FITS file\" \"ODF_VERSION\" \"Contents \
of file\"" attributename="SEQ_ID REVOLUT PROCDATE PROCREV PPSVERS SASVERS ODSVER ORIGIN ODFVER CONTENT" attributetype="string string \
string string string string string string string string" booleanvalue="" set=product/P0871010201OBX000CALIND0000.FIT \
stringvalue="\"149313\" \"3808\" \"2020-10-05T10:00:03\" \"1\" \"18.02_20200221_1200\" \"xmmsas_20191120_1210-18.0.0\" \"18.0\" \
\"XMM-Newton/SOC\" \"001\" \"CALIBRATION INDEX FILE\"" -w 10
# # [OUTPUT] [2020-10-05T08:00:27]
# # [INFO] [2020-10-05T08:00:27] Task Run Time addattribute 0.101879835128784s
#
# [COMMAND] [2020-10-05T08:00:27]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:27]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:27] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:27]
addattribute attributecomment="\"Pipeline sequence\" \"Satellite Revolution Number\" \"Processing date\" \"Processing revision\" \
\"PPS configuration\" \"SAS version used in pipeline processing\" \"ODS version\" \"Origin of FITS file\" \"ODF_VERSION\" \"Contents \
of file\"" attributename="SEQ_ID REVOLUT PROCDATE PROCREV PPSVERS SASVERS ODSVER ORIGIN ODFVER CONTENT" attributetype="string string \
string string string string string string string string" booleanvalue="" set=product/P0871010201OBX000ATTTSR0000.FIT \
stringvalue="\"149313\" \"3808\" \"2020-10-05T10:00:03\" \"1\" \"18.02_20200221_1200\" \"xmmsas_20191120_1210-18.0.0\" \"18.0\" \
\"XMM-Newton/SOC\" \"001\" \"ATTITUDE TIME SERIES\"" -w 10
# # [OUTPUT] [2020-10-05T08:00:27]
# # [INFO] [2020-10-05T08:00:27] Task Run Time addattribute 0.109619855880737s
#
# [COMMAND] [2020-10-05T08:00:27]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:27]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:27] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:27]
addattribute attributecomment="\"Pipeline sequence\" \"Satellite Revolution Number\" \"Processing date\" \"Processing revision\" \
\"PPS configuration\" \"SAS version used in pipeline processing\" \"ODS version\" \"Origin of FITS file\" \"ODF_VERSION\" \"Contents \
of file\"" attributename="SEQ_ID REVOLUT PROCDATE PROCREV PPSVERS SASVERS ODSVER ORIGIN ODFVER CONTENT" attributetype="string string \
string string string string string string string string" booleanvalue="" set=product/P0871010201OBX000ORBTSR0000.FIT \
stringvalue="\"149313\" \"3808\" \"2020-10-05T10:00:03\" \"1\" \"18.02_20200221_1200\" \"xmmsas_20191120_1210-18.0.0\" \"18.0\" \
\"XMM-Newton/SOC\" \"001\" \"SPACECRAFT ORBIT\"" -w 10
# # [OUTPUT] [2020-10-05T08:00:27]
# # [INFO] [2020-10-05T08:00:27] Task Run Time addattribute 0.106506109237671s
#
# [COMMAND] [2020-10-05T08:00:27]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2020-10-05T08:00:27]
export SAS_RAND_SEED=871010201
# # [INFO] [2020-10-05T08:00:27] ## DEBUG ModuleResources: SAS_RAND_SEED set: 871010201
# [COMMAND] [2020-10-05T08:00:27]
addattribute attributecomment="\"Pipeline sequence\" \"Satellite Revolution Number\" \"Processing date\" \"Processing revision\" \
\"PPS configuration\" \"SAS version used in pipeline processing\" \"ODS version\" \"Origin of FITS file\" \"ODF_VERSION\" \"Contents \
of file\"" attributename="SEQ_ID REVOLUT PROCDATE PROCREV PPSVERS SASVERS ODSVER ORIGIN ODFVER CONTENT" attributetype="string string \
string string string string string string string string" booleanvalue="" set=product/P0871010201OBX000RADMON0000.FIT \
stringvalue="\"149313\" \"3808\" \"2020-10-05T10:00:03\" \"1\" \"18.02_20200221_1200\" \"xmmsas_20191120_1210-18.0.0\" \"18.0\" \
\"XMM-Newton/SOC\" \"001\" \"RADMON RATE\"" -w 10
# # [OUTPUT] [2020-10-05T08:00:27]
# # [INFO] [2020-10-05T08:00:27] Task Run Time addattribute 0.102195024490356s
#
# [COMMAND] [2020-10-05T08:00:27]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits
# # [INFO] [2020-10-05T08:00:27] System RV 0
# [COMMAND] [2020-10-05T08:00:27]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2020-10-05T08:00:27] System RV 0
