
#!/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:56:33] Module name: VerifyODF
# # [INFO] [2024-11-30T23:56:33] Instrument: all
# # [INFO] [2024-11-30T23:56:33] Stream no.: 0001
# # [INFO] [2024-11-30T23:56:33] Module version number: 1.18
# # [INFO] [2024-11-30T23:56:33] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:56:33] Module name: MakeCIF
# # [INFO] [2024-11-30T23:56:33] Instrument: all
# # [INFO] [2024-11-30T23:56:33] Stream no.: 0001
# # [INFO] [2024-11-30T23:56:33] Module version number: 1.23
# # [INFO] [2024-11-30T23:56:33] Observation start defined as >2010-04-14T09:05:39.000<
# # [INFO] [2024-11-30T23:56:33] Processing date defined as >2024-12-01T00:56:33<
# [COMMAND] [2024-11-30T23:56:33]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:56:33]
export SAS_RAND_SEED=0656580101
# # [INFO] [2024-11-30T23:56:33] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580101
# [COMMAND] [2024-11-30T23:56:33]
cifbuild analysisdate=2024-12-01T00:56:33 calindexset=product/P0656580101OBX000CALIND0000.FIT fullpath=no \
observationdate=2010-04-14T09:05:39.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:57:03]
# # [INFO] [2024-11-30T23:57:03] Task Run Time cifbuild 29.5426621437073s
#
# [COMMAND] [2024-11-30T23:57:03]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:03]
export SAS_RAND_SEED=0656580101
# # [INFO] [2024-11-30T23:57:03] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580101
# [COMMAND] [2024-11-30T23:57:03]
addattribute attributecomment="\"Telescope (mission) name\" \"Name of PI\" \"Date observations were made\" \"DEC of instrument \
pointing\" \"RA of instrument pointing (degrees)\" \"Date observations ended\" \"Observation mode (pointing or slew)\" \"Name of \
observed object\" \"Observation identifier\"" attributename="TELESCOP OBSERVER DATE-OBS DEC_PNT RA_PNT DATE-END OBS_MODE OBJECT \
OBS_ID" attributetype="string string string real real string string string string" realvalue="\"-2.9444444\" \"281.2208325\"" \
set=product/P0656580101OBX000CALIND0000.FIT stringvalue="\"XMM\" \"Dr Arvind Parmar XMM-Newton MM\" \"2010-04-14T09:05:39.000\" \
\"2010-04-14T18:57:46.000\" \"POINTED\" \"AXJ1845-0258\" \"0656580101\"" -w 10
# # [OUTPUT] [2024-11-30T23:57:03]
# # [INFO] [2024-11-30T23:57:03] Task Run Time addattribute 0.118880987167358s
#
# [COMMAND] [2024-11-30T23:57:03]
cp /scratch/226852.1.all.q/xmm/ppsprod/229997/product/P0656580101OBX000CALIND0000.FIT \
/scratch/226852.1.all.q/xmm/ppsprod/229997/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:57:03] System RV 0
# # [INFO] [2024-11-30T23:57:03] Module name: GlobalHK
# # [INFO] [2024-11-30T23:57:03] Instrument: all
# # [INFO] [2024-11-30T23:57:03] Stream no.: 0001
# # [INFO] [2024-11-30T23:57:03] Module version number: 1.81
# [COMMAND] [2024-11-30T23:57:03]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:03]
export SAS_RAND_SEED=0656580101
# # [INFO] [2024-11-30T23:57:03] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580101
# [COMMAND] [2024-11-30T23:57:03]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:57:05] ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.35s between AHF entries 131\
#     (2010-04-14T09:15:29.999) and 132 (2010-04-14T09:15:34.000) - adjusting duration of entry 131 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.52s between AHF entries 139 (2010-04-14T09:18:35.999) and 140\
#     (2010-04-14T09:19:02.000) - adjusting duration of entry 139 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 241 (2010-04-14T10:01:11.999) and 242\
#     (2010-04-14T10:01:48.999) - adjusting duration of entry 241 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 1303 (2010-04-14T14:42:23.999) and 1304\
#     (2010-04-14T14:43:46.999) - adjusting duration of entry 1303 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.35s between AHF entries 131 (2010-04-14T09:15:29.999)\
#     and 132 (2010-04-14T09:15:34.000) - adjusting duration of entry 131 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.52s between AHF entries 139 (2010-04-14T09:18:35.999)\
#     and 140 (2010-04-14T09:19:02.000) - adjusting duration of entry 139 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 241 (2010-04-14T10:01:11.999)\
#     and 242 (2010-04-14T10:01:48.999) - adjusting duration of entry 241 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 1303 (2010-04-14T14:42:23.999)\
#     and 1304 (2010-04-14T14:43:46.999) - adjusting duration of entry 1303 accordingly 
# # [INFO] [2024-11-30T23:57:05] Task Run Time preqgti 2.19125986099243s
#
# [COMMAND] [2024-11-30T23:57:05]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:05]
export SAS_RAND_SEED=0656580101
# # [INFO] [2024-11-30T23:57:05] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580101
# [COMMAND] [2024-11-30T23:57:05]
atthkgen atthkset=product/P0656580101OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:57:06] ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.35s between AHF entries 131\
#     (2010-04-14T09:15:29.999) and 132 (2010-04-14T09:15:34.000) - adjusting duration of entry 131 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.52s between AHF entries 139 (2010-04-14T09:18:35.999) and 140\
#     (2010-04-14T09:19:02.000) - adjusting duration of entry 139 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 241 (2010-04-14T10:01:11.999) and 242\
#     (2010-04-14T10:01:48.999) - adjusting duration of entry 241 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 1303 (2010-04-14T14:42:23.999) and 1304\
#     (2010-04-14T14:43:46.999) - adjusting duration of entry 1303 accordingly 
# # [INFO] [2024-11-30T23:57:06] Task Run Time atthkgen 0.881144046783447s
#
# [COMMAND] [2024-11-30T23:57:06]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:06]
export SAS_RAND_SEED=0656580101
# # [INFO] [2024-11-30T23:57:06] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580101
# [COMMAND] [2024-11-30T23:57:06]
orbit outfile=product/P0656580101OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:57:07] orbit:- Output FITS Orbit timeseries: product/P0656580101OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.35s between AHF entries 131 (2010-04-14T09:15:29.999) and 132\
#     (2010-04-14T09:15:34.000) - adjusting duration of entry 131 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.52s between AHF entries 139 (2010-04-14T09:18:35.999) and 140\
#     (2010-04-14T09:19:02.000) - adjusting duration of entry 139 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 241 (2010-04-14T10:01:11.999) and 242\
#     (2010-04-14T10:01:48.999) - adjusting duration of entry 241 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.5s between AHF entries 1303 (2010-04-14T14:42:23.999) and 1304\
#     (2010-04-14T14:43:46.999) - adjusting duration of entry 1303 accordingly 
# # [INFO] [2024-11-30T23:57:07] Task Run Time orbit 1.17873287200928s
#
# [COMMAND] [2024-11-30T23:57:07]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:07]
export SAS_RAND_SEED=0656580101
# # [INFO] [2024-11-30T23:57:07] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0656580101
# [COMMAND] [2024-11-30T23:57:07]
radmonfix output=product/P0656580101OBX000RADMON0000.FIT radmonlist="odf/1895_0656580101_RMX00100ECX.FIT \
odf/1895_0656580101_RMX00200ECX.FIT odf/1895_0656580101_RMX00300ECX.FIT" withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:57:07] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857629.9 which\
#     is outside the time correlation data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857633.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857637.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857641.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857645.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857649.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857653.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857657.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857661.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=308857665.9 which is outside the time correlation\
#     data abscissa range [308858096.2, 308895367.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Adding 1753 counts rows from row 258
# radmonfix:- Adding 6846 counts rows from row 2011
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 82 times 
# # [INFO] [2024-11-30T23:57:07] Task Run Time radmonfix 0.22706413269043s
#
# [COMMAND] [2024-11-30T23:57:07]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226852.1.all.q/xmm/ppsprod/229997/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:57:07] System RV 0
# # [INFO] [2024-11-30T23:57:07] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:57:07]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226852.1.all.q/xmm/ppsprod/229997/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:57:07] System RV 0
# [COMMAND] [2024-11-30T23:57:07]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226852.1.all.q/xmm/ppsprod/229997/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:57:07] System RV 0
# [COMMAND] [2024-11-30T23:57:07]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226852.1.all.q/xmm/ppsprod/229997/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:57:07] System RV 0
# # [INFO] [2024-11-30T23:57:07] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:07] Instrument: emos1
# # [INFO] [2024-11-30T23:57:07] Stream no.: 0001
# # [INFO] [2024-11-30T23:57:07] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:07] Checking exposure S002 for processability
# # [INFO] [2024-11-30T23:57:07] Filter: CalClosed
# # [INFO] [2024-11-30T23:57:07] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:57:07] Exposure duration: 35322
# # [INFO] [2024-11-30T23:57:07] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:57:07] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:07] Instrument: emos2
# # [INFO] [2024-11-30T23:57:07] Stream no.: 0001
# # [INFO] [2024-11-30T23:57:07] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:07] Checking exposure S003 for processability
# # [INFO] [2024-11-30T23:57:07] Filter: CalClosed
# # [INFO] [2024-11-30T23:57:07] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:57:07] Exposure duration: 35334
# # [INFO] [2024-11-30T23:57:07] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0001
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure S001 for processability
# # [INFO] [2024-11-30T23:57:08] Filter: CalClosed
# # [INFO] [2024-11-30T23:57:08] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:57:08] Exposure duration: 33733
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0002
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U002 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0003
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U003 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0004
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U004 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0005
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U005 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0006
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U006 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0007
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U007 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0008
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U008 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0009
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U009 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0010
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U010 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0011
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U011 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0012
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U012 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0013
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U013 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:57:08] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:08] Instrument: epn
# # [INFO] [2024-11-30T23:57:08] Stream no.: 0014
# # [INFO] [2024-11-30T23:57:08] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:08] Checking exposure U101 for processability
# # [INFO] [2024-11-30T23:57:08] Exposure ignored due to lack of event files
