
#!/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:50:13] Module name: VerifyODF
# # [INFO] [2024-11-30T23:50:13] Instrument: all
# # [INFO] [2024-11-30T23:50:13] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:13] Module version number: 1.18
# # [INFO] [2024-11-30T23:50:13] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:50:13] Module name: MakeCIF
# # [INFO] [2024-11-30T23:50:13] Instrument: all
# # [INFO] [2024-11-30T23:50:13] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:13] Module version number: 1.23
# # [INFO] [2024-11-30T23:50:13] Observation start defined as >2012-03-01T19:17:30.000<
# # [INFO] [2024-11-30T23:50:13] Processing date defined as >2024-12-01T00:50:13<
# [COMMAND] [2024-11-30T23:50:13]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:13]
export SAS_RAND_SEED=0656580201
# # [INFO] [2024-11-30T23:50:13] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580201
# [COMMAND] [2024-11-30T23:50:13]
cifbuild analysisdate=2024-12-01T00:50:13 calindexset=product/P0656580201OBX000CALIND0000.FIT fullpath=no \
observationdate=2012-03-01T19:17:30.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:50:43]
# # [INFO] [2024-11-30T23:50:43] Task Run Time cifbuild 29.5978419780731s
#
# [COMMAND] [2024-11-30T23:50:43]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:43]
export SAS_RAND_SEED=0656580201
# # [INFO] [2024-11-30T23:50:43] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580201
# [COMMAND] [2024-11-30T23:50:43]
addattribute attributecomment="\"Telescope (mission) name\" \"Observation identifier\" \"Observation mode (pointing or slew)\" \
\"Date observations ended\" \"Name of PI\" \"RA of instrument pointing (degrees)\" \"DEC of instrument pointing\" \"Date \
observations were made\" \"Name of observed object\"" attributename="TELESCOP OBS_ID OBS_MODE DATE-END OBSERVER RA_PNT DEC_PNT \
DATE-OBS OBJECT" attributetype="string string string string string real real string string" realvalue="\"44.961249\" \"50.0141111\"" \
set=product/P0656580201OBX000CALIND0000.FIT stringvalue="\"XMM\" \"0656580201\" \"POINTED\" \"2012-03-02T00:19:14.000\" \"Dr Arvind \
Parmar XMM-Newton MM\" \"2012-03-01T19:17:30.000\" \"Perigee\"" -w 10
# # [OUTPUT] [2024-11-30T23:50:43]
# # [INFO] [2024-11-30T23:50:43] Task Run Time addattribute 0.0594069957733154s
#
# [COMMAND] [2024-11-30T23:50:43]
cp /scratch/226346.1.all.q/xmm/ppsprod/229490/product/P0656580201OBX000CALIND0000.FIT \
/scratch/226346.1.all.q/xmm/ppsprod/229490/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:50:43] System RV 0
# # [INFO] [2024-11-30T23:50:43] Module name: GlobalHK
# # [INFO] [2024-11-30T23:50:43] Instrument: all
# # [INFO] [2024-11-30T23:50:43] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:43] Module version number: 1.81
# [COMMAND] [2024-11-30T23:50:43]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:43]
export SAS_RAND_SEED=0656580201
# # [INFO] [2024-11-30T23:50:43] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580201
# [COMMAND] [2024-11-30T23:50:43]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:50:44] ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.52002s between AHF entries 695\
#     (2012-03-01T19:20:28.000) and 696 (2012-03-01T19:30:37.000) - adjusting duration of entry 695 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 791 (2012-03-01T20:23:59.000) and 792\
#     (2012-03-01T20:26:31.999) - adjusting duration of entry 791 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 839 (2012-03-01T20:38:09.000) and 840\
#     (2012-03-01T20:41:31.999) - adjusting duration of entry 839 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.520004s between AHF entries 888 (2012-03-01T21:26:32.999) and\
#     889 (2012-03-01T21:30:36.999) - adjusting duration of entry 888 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.0899659s between AHF entries 937 (2012-03-01T21:41:32.000) and\
#     938 (2012-03-01T22:15:36.999) - adjusting duration of entry 937 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 1032 (2012-03-01T22:38:08.999) and 1033\
#     (2012-03-01T22:41:31.999) - adjusting duration of entry 1032 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.52002s between AHF entries 695\
#     (2012-03-01T19:20:28.000) and 696 (2012-03-01T19:30:37.000) - adjusting duration of entry 695 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 791 (2012-03-01T20:23:59.000)\
#     and 792 (2012-03-01T20:26:31.999) - adjusting duration of entry 791 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 839 (2012-03-01T20:38:09.000)\
#     and 840 (2012-03-01T20:41:31.999) - adjusting duration of entry 839 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.520004s between AHF entries 888\
#     (2012-03-01T21:26:32.999) and 889 (2012-03-01T21:30:36.999) - adjusting duration of entry 888 accordingly
# ** preqgti: warning (SummaryOfWarnings), 
# warning TemporalOverlapInAHF silently occurred 2 times 
# # [INFO] [2024-11-30T23:50:44] Task Run Time preqgti 1.04933595657349s
#
# [COMMAND] [2024-11-30T23:50:44]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:44]
export SAS_RAND_SEED=0656580201
# # [INFO] [2024-11-30T23:50:44] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580201
# [COMMAND] [2024-11-30T23:50:44]
atthkgen atthkset=product/P0656580201OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:50:44] ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.52002s between AHF entries 695\
#     (2012-03-01T19:20:28.000) and 696 (2012-03-01T19:30:37.000) - adjusting duration of entry 695 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 791 (2012-03-01T20:23:59.000) and 792\
#     (2012-03-01T20:26:31.999) - adjusting duration of entry 791 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 839 (2012-03-01T20:38:09.000) and 840\
#     (2012-03-01T20:41:31.999) - adjusting duration of entry 839 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.520004s between AHF entries 888 (2012-03-01T21:26:32.999) and\
#     889 (2012-03-01T21:30:36.999) - adjusting duration of entry 888 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.0899659s between AHF entries 937 (2012-03-01T21:41:32.000) and\
#     938 (2012-03-01T22:15:36.999) - adjusting duration of entry 937 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 1032 (2012-03-01T22:38:08.999) and 1033\
#     (2012-03-01T22:41:31.999) - adjusting duration of entry 1032 accordingly 
# # [INFO] [2024-11-30T23:50:44] Task Run Time atthkgen 0.514384031295776s
#
# [COMMAND] [2024-11-30T23:50:44]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:44]
export SAS_RAND_SEED=0656580201
# # [INFO] [2024-11-30T23:50:44] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580201
# [COMMAND] [2024-11-30T23:50:44]
orbit outfile=product/P0656580201OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:50:45] orbit:- Output FITS Orbit timeseries: product/P0656580201OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.52002s between AHF entries 695 (2012-03-01T19:20:28.000) and 696\
#     (2012-03-01T19:30:37.000) - adjusting duration of entry 695 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 791 (2012-03-01T20:23:59.000) and 792\
#     (2012-03-01T20:26:31.999) - adjusting duration of entry 791 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 839 (2012-03-01T20:38:09.000) and 840\
#     (2012-03-01T20:41:31.999) - adjusting duration of entry 839 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.520004s between AHF entries 888 (2012-03-01T21:26:32.999) and 889\
#     (2012-03-01T21:30:36.999) - adjusting duration of entry 888 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.0899659s between AHF entries 937 (2012-03-01T21:41:32.000) and 938\
#     (2012-03-01T22:15:36.999) - adjusting duration of entry 937 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 1032 (2012-03-01T22:38:08.999) and 1033\
#     (2012-03-01T22:41:31.999) - adjusting duration of entry 1032 accordingly 
# # [INFO] [2024-11-30T23:50:45] Task Run Time orbit 0.727072954177856s
#
# [COMMAND] [2024-11-30T23:50:45]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:50:45]
export SAS_RAND_SEED=0656580201
# # [INFO] [2024-11-30T23:50:45] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580201
# [COMMAND] [2024-11-30T23:50:45]
radmonfix output=product/P0656580201OBX000RADMON0000.FIT radmonlist=odf/2239_0656580201_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:50:45] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368249977.9 which\
#     is outside the time correlation data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368249981.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368249985.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368249989.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368249993.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368249997.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368250001.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368250005.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368250009.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=368250013.9 which is outside the time correlation\
#     data abscissa range [368250991.8, 368271032.2] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 274 times 
# # [INFO] [2024-11-30T23:50:45] Task Run Time radmonfix 0.258524179458618s
#
# [COMMAND] [2024-11-30T23:50:45]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226346.1.all.q/xmm/ppsprod/229490/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:50:45] System RV 0
# # [INFO] [2024-11-30T23:50:45] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:50:45]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226346.1.all.q/xmm/ppsprod/229490/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:50:46] System RV 0
# [COMMAND] [2024-11-30T23:50:46]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226346.1.all.q/xmm/ppsprod/229490/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:50:46] System RV 0
# [COMMAND] [2024-11-30T23:50:46]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226346.1.all.q/xmm/ppsprod/229490/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:50:46] System RV 0
# # [INFO] [2024-11-30T23:50:46] Module name: ExpChooser
# # [INFO] [2024-11-30T23:50:46] Instrument: epn
# # [INFO] [2024-11-30T23:50:46] Stream no.: 0003
# # [INFO] [2024-11-30T23:50:46] Module version number: 1.38
# # [INFO] [2024-11-30T23:50:46] Checking exposure S007 for processability
# # [INFO] [2024-11-30T23:50:46] Filter: UNDEFINED
# # [INFO] [2024-11-30T23:50:46] Instrument mode: FastTiming
# # [INFO] [2024-11-30T23:50:46] Exposure duration: 1
# # [INFO] [2024-11-30T23:50:46] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:50:46] Module name: ExpChooser
# # [INFO] [2024-11-30T23:50:46] Instrument: epn
# # [INFO] [2024-11-30T23:50:46] Stream no.: 0004
# # [INFO] [2024-11-30T23:50:46] Module version number: 1.38
# # [INFO] [2024-11-30T23:50:46] Checking exposure U201 for processability
# # [INFO] [2024-11-30T23:50:46] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:50:46] Module name: ExpChooser
# # [INFO] [2024-11-30T23:50:46] Instrument: emos1
# # [INFO] [2024-11-30T23:50:46] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:46] Module version number: 1.38
# # [INFO] [2024-11-30T23:50:46] Checking exposure S001 for processability
# # [INFO] [2024-11-30T23:50:46] Filter: CalClosed
# # [INFO] [2024-11-30T23:50:46] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:50:46] Exposure duration: 18102
# # [INFO] [2024-11-30T23:50:46] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:50:46] Module name: ExpChooser
# # [INFO] [2024-11-30T23:50:46] Instrument: emos2
# # [INFO] [2024-11-30T23:50:46] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:46] Module version number: 1.38
# # [INFO] [2024-11-30T23:50:46] Checking exposure S002 for processability
# # [INFO] [2024-11-30T23:50:46] Filter: CalClosed
# # [INFO] [2024-11-30T23:50:46] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:50:46] Exposure duration: 18104
# # [INFO] [2024-11-30T23:50:46] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:50:46] Module name: ExpChooser
# # [INFO] [2024-11-30T23:50:46] Instrument: epn
# # [INFO] [2024-11-30T23:50:46] Stream no.: 0001
# # [INFO] [2024-11-30T23:50:46] Module version number: 1.38
# # [INFO] [2024-11-30T23:50:46] Checking exposure S003 for processability
# # [INFO] [2024-11-30T23:50:46] Filter: UNDEFINED
# # [INFO] [2024-11-30T23:50:46] Instrument mode: FastTiming
# # [INFO] [2024-11-30T23:50:46] Exposure duration: 1
# # [INFO] [2024-11-30T23:50:46] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:50:46] Module name: ExpChooser
# # [INFO] [2024-11-30T23:50:46] Instrument: epn
# # [INFO] [2024-11-30T23:50:46] Stream no.: 0002
# # [INFO] [2024-11-30T23:50:46] Module version number: 1.38
# # [INFO] [2024-11-30T23:50:46] Checking exposure S006 for processability
# # [INFO] [2024-11-30T23:50:46] Filter: UNDEFINED
# # [INFO] [2024-11-30T23:50:46] Instrument mode: FastTiming
# # [INFO] [2024-11-30T23:50:46] Exposure duration: 0
# # [INFO] [2024-11-30T23:50:46] Exposure ignored due to invalid or unsupported filter
