
#!/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:52:06] Module name: VerifyODF
# # [INFO] [2024-11-30T23:52:06] Instrument: all
# # [INFO] [2024-11-30T23:52:06] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:06] Module version number: 1.18
# # [INFO] [2024-11-30T23:52:06] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:52:06] Module name: MakeCIF
# # [INFO] [2024-11-30T23:52:06] Instrument: all
# # [INFO] [2024-11-30T23:52:06] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:06] Module version number: 1.23
# # [INFO] [2024-11-30T23:52:06] Observation start defined as >2015-10-06T08:04:58.000<
# # [INFO] [2024-11-30T23:52:06] Processing date defined as >2024-12-01T00:52:05<
# [COMMAND] [2024-11-30T23:52:06]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:06]
export SAS_RAND_SEED=0727760801
# # [INFO] [2024-11-30T23:52:06] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0727760801
# [COMMAND] [2024-11-30T23:52:06]
cifbuild analysisdate=2024-12-01T00:52:05 calindexset=product/P0727760801OBX000CALIND0000.FIT fullpath=no \
observationdate=2015-10-06T08:04:58.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:52:35]
# # [INFO] [2024-11-30T23:52:35] Task Run Time cifbuild 29.1225259304047s
#
# [COMMAND] [2024-11-30T23:52:35]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:35]
export SAS_RAND_SEED=0727760801
# # [INFO] [2024-11-30T23:52:35] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0727760801
# [COMMAND] [2024-11-30T23:52:35]
addattribute attributecomment="\"Telescope (mission) name\" \"Observation identifier\" \"DEC of instrument pointing\" \"Date \
observations ended\" \"Date observations were made\" \"Name of observed object\" \"RA of instrument pointing (degrees)\" \
\"Observation mode (pointing or slew)\" \"Name of PI\"" attributename="TELESCOP OBS_ID DEC_PNT DATE-END DATE-OBS OBJECT RA_PNT \
OBS_MODE OBSERVER" attributetype="string string real string string string real string string" realvalue="-67.4619444 248.07" \
set=product/P0727760801OBX000CALIND0000.FIT stringvalue="\"XMM\" \"0727760801\" \"2015-10-06T17:37:08.000\" \
\"2015-10-06T08:04:58.000\" \"Thrusters cal\" \"POINTED\" \"Dr Fred Jansen XMM-Newton MM\"" -w 10
# # [OUTPUT] [2024-11-30T23:52:35]
# # [INFO] [2024-11-30T23:52:35] Task Run Time addattribute 0.0496790409088135s
#
# [COMMAND] [2024-11-30T23:52:35]
cp /scratch/226481.1.all.q/xmm/ppsprod/229627/product/P0727760801OBX000CALIND0000.FIT \
/scratch/226481.1.all.q/xmm/ppsprod/229627/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:52:35] System RV 0
# # [INFO] [2024-11-30T23:52:35] Module name: GlobalHK
# # [INFO] [2024-11-30T23:52:35] Instrument: all
# # [INFO] [2024-11-30T23:52:35] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:35] Module version number: 1.81
# [COMMAND] [2024-11-30T23:52:35]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:35]
export SAS_RAND_SEED=0727760801
# # [INFO] [2024-11-30T23:52:35] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0727760801
# [COMMAND] [2024-11-30T23:52:35]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:52:36] ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.490002s between AHF entries\
#     1945 (2015-10-06T08:10:56.000) and 1946 (2015-10-06T08:11:58.999) - adjusting duration of entry 1945 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.56s between AHF entries 1993 (2015-10-06T08:34:36.000) and 1994\
#     (2015-10-06T08:34:50.000) - adjusting duration of entry 1993 accordingly
# ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.49s between AHF entries 4053 (2015-10-06T14:21:54.999) and 4054\
#     (2015-10-06T14:22:05.000) - adjusting duration of entry 4053 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.490002s between AHF entries 1945\
#     (2015-10-06T08:10:56.000) and 1946 (2015-10-06T08:11:58.999) - adjusting duration of entry 1945 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.56s between AHF entries 1993 (2015-10-06T08:34:36.000)\
#     and 1994 (2015-10-06T08:34:50.000) - adjusting duration of entry 1993 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.49s between AHF entries 4053 (2015-10-06T14:21:54.999)\
#     and 4054 (2015-10-06T14:22:05.000) - adjusting duration of entry 4053 accordingly
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540430.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540430.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540431.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540431.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540432.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540432.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540433.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540433.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540434.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 22 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 560540434.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 22 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 4552 times 
# # [INFO] [2024-11-30T23:52:36] Task Run Time preqgti 1.25487494468689s
#
# [COMMAND] [2024-11-30T23:52:36]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:36]
export SAS_RAND_SEED=0727760801
# # [INFO] [2024-11-30T23:52:36] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0727760801
# [COMMAND] [2024-11-30T23:52:36]
atthkgen atthkset=product/P0727760801OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:52:37] ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.490002s between AHF entries\
#     1945 (2015-10-06T08:10:56.000) and 1946 (2015-10-06T08:11:58.999) - adjusting duration of entry 1945 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.56s between AHF entries 1993 (2015-10-06T08:34:36.000) and 1994\
#     (2015-10-06T08:34:50.000) - adjusting duration of entry 1993 accordingly
# ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.49s between AHF entries 4053 (2015-10-06T14:21:54.999) and 4054\
#     (2015-10-06T14:22:05.000) - adjusting duration of entry 4053 accordingly 
# # [INFO] [2024-11-30T23:52:37] Task Run Time atthkgen 0.774431943893433s
#
# [COMMAND] [2024-11-30T23:52:37]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:37]
export SAS_RAND_SEED=0727760801
# # [INFO] [2024-11-30T23:52:37] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0727760801
# [COMMAND] [2024-11-30T23:52:37]
orbit outfile=product/P0727760801OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:52:38] orbit:- Output FITS Orbit timeseries: product/P0727760801OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.490002s between AHF entries 1945 (2015-10-06T08:10:56.000) and\
#     1946 (2015-10-06T08:11:58.999) - adjusting duration of entry 1945 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.56s between AHF entries 1993 (2015-10-06T08:34:36.000) and 1994\
#     (2015-10-06T08:34:50.000) - adjusting duration of entry 1993 accordingly
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.49s between AHF entries 4053 (2015-10-06T14:21:54.999) and 4054\
#     (2015-10-06T14:22:05.000) - adjusting duration of entry 4053 accordingly 
# # [INFO] [2024-11-30T23:52:38] Task Run Time orbit 1.12299609184265s
#
# [COMMAND] [2024-11-30T23:52:38]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:38]
export SAS_RAND_SEED=0727760801
# # [INFO] [2024-11-30T23:52:38] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0727760801
# [COMMAND] [2024-11-30T23:52:38]
radmonfix output=product/P0727760801OBX000RADMON0000.FIT radmonlist=odf/2898_0727760801_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:52:38] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794793.95 which\
#     is outside the time correlation data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794797.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794801.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794805.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794809.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794813.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794817.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794821.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794825.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=31794829.95 which is outside the time correlation\
#     data abscissa range [31795116.86, 31831191.76] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 393 times 
# # [INFO] [2024-11-30T23:52:38] Task Run Time radmonfix 0.143714189529419s
#
# [COMMAND] [2024-11-30T23:52:38]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226481.1.all.q/xmm/ppsprod/229627/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:38] System RV 0
# # [INFO] [2024-11-30T23:52:38] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:52:38]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226481.1.all.q/xmm/ppsprod/229627/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:38] System RV 0
# [COMMAND] [2024-11-30T23:52:38]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226481.1.all.q/xmm/ppsprod/229627/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:38] System RV 0
# [COMMAND] [2024-11-30T23:52:38]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226481.1.all.q/xmm/ppsprod/229627/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:38] System RV 0
# # [INFO] [2024-11-30T23:52:38] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:38] Instrument: epn
# # [INFO] [2024-11-30T23:52:38] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:38] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:38] Checking exposure S003 for processability
# # [INFO] [2024-11-30T23:52:38] Filter: CalClosed
# # [INFO] [2024-11-30T23:52:38] Instrument mode: PrimeSmallWindow
# # [INFO] [2024-11-30T23:52:38] Exposure duration: 33980
# # [INFO] [2024-11-30T23:52:38] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:52:38] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:38] Instrument: epn
# # [INFO] [2024-11-30T23:52:38] Stream no.: 0002
# # [INFO] [2024-11-30T23:52:38] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:38] Checking exposure U801 for processability
# # [INFO] [2024-11-30T23:52:38] Exposure ignored due to lack of event files
# # [INFO] [2024-11-30T23:52:38] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:38] Instrument: om
# # [INFO] [2024-11-30T23:52:38] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:38] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:38] Checking exposure S004 for processability
# # [INFO] [2024-11-30T23:52:38] Filter: Blocked
# # [INFO] [2024-11-30T23:52:38] Instrument mode: IntensifierCharacteristics
# # [INFO] [2024-11-30T23:52:38] Exposure duration: 20
# # [INFO] [2024-11-30T23:52:38] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:52:38] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:38] Instrument: om
# # [INFO] [2024-11-30T23:52:38] Stream no.: 0002
# # [INFO] [2024-11-30T23:52:38] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:38] Checking exposure S005 for processability
# # [INFO] [2024-11-30T23:52:38] Filter: Blocked
# # [INFO] [2024-11-30T23:52:38] Instrument mode: FlatFieldLow
# # [INFO] [2024-11-30T23:52:38] Exposure duration: 1501
# # [INFO] [2024-11-30T23:52:38] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:52:38] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:38] Instrument: om
# # [INFO] [2024-11-30T23:52:38] Stream no.: 0003
# # [INFO] [2024-11-30T23:52:38] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:38] Checking exposure S006 for processability
# # [INFO] [2024-11-30T23:52:38] Filter: Blocked
# # [INFO] [2024-11-30T23:52:38] Instrument mode: DarkLow
# # [INFO] [2024-11-30T23:52:38] Exposure duration: 1501
# # [INFO] [2024-11-30T23:52:38] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:52:38] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:38] Instrument: om
# # [INFO] [2024-11-30T23:52:38] Stream no.: 0004
# # [INFO] [2024-11-30T23:52:38] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:38] Checking exposure S008 for processability
# # [INFO] [2024-11-30T23:52:38] Filter: Blocked
# # [INFO] [2024-11-30T23:52:38] Instrument mode: FlatFieldHigh
# # [INFO] [2024-11-30T23:52:38] Exposure duration: 3999
# # [INFO] [2024-11-30T23:52:38] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:52:38] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:38] Instrument: emos1
# # [INFO] [2024-11-30T23:52:38] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:38] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:38] Checking exposure S001 for processability
# # [INFO] [2024-11-30T23:52:38] Filter: CalClosed
# # [INFO] [2024-11-30T23:52:38] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:52:38] Exposure duration: 34156
# # [INFO] [2024-11-30T23:52:38] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:52:38] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:38] Instrument: emos2
# # [INFO] [2024-11-30T23:52:38] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:38] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:38] Checking exposure S002 for processability
# # [INFO] [2024-11-30T23:52:38] Filter: CalClosed
# # [INFO] [2024-11-30T23:52:38] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:52:38] Exposure duration: 34126
# # [INFO] [2024-11-30T23:52:38] Exposure ignored due to invalid or unsupported filter
