
#!/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:18] Module name: VerifyODF
# # [INFO] [2024-11-30T23:52:18] Instrument: all
# # [INFO] [2024-11-30T23:52:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:18] Module version number: 1.18
# # [INFO] [2024-11-30T23:52:18] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:52:18] Module name: MakeCIF
# # [INFO] [2024-11-30T23:52:18] Instrument: all
# # [INFO] [2024-11-30T23:52:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:18] Module version number: 1.23
# # [INFO] [2024-11-30T23:52:18] Observation start defined as >2000-09-22T10:00:37.000<
# # [INFO] [2024-11-30T23:52:18] Processing date defined as >2024-12-01T00:52:18<
# [COMMAND] [2024-11-30T23:52:18]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:18]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:18] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:18]
cifbuild analysisdate=2024-12-01T00:52:18 calindexset=product/P0101640501OBX000CALIND0000.FIT fullpath=no \
observationdate=2000-09-22T10:00:37.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:52:48]
# # [INFO] [2024-11-30T23:52:48] Task Run Time cifbuild 29.7964658737183s
#
# [COMMAND] [2024-11-30T23:52:48]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:48]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:48] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:48]
addattribute attributecomment="\"Telescope (mission) name\" \"RA of instrument pointing (degrees)\" \"DEC of instrument pointing\" \
\"Observation mode (pointing or slew)\" \"Date observations were made\" \"Name of PI\" \"Name of observed object\" \"Observation \
identifier\" \"Date observations ended\"" attributename="TELESCOP RA_PNT DEC_PNT OBS_MODE DATE-OBS OBSERVER OBJECT OBS_ID DATE-END" \
attributetype="string real real string string string string string string" realvalue="\"253.2441675\" \"2.4011111\"" \
set=product/P0101640501OBX000CALIND0000.FIT stringvalue="\"XMM\" \"POINTED\" \"2000-09-22T10:00:37.000\" \"Dr Bernd Aschenbach\" \
\"NGC 6240_RGS.OM\" \"0101640501\" \"2000-09-22T11:47:53.000\"" -w 10
# # [OUTPUT] [2024-11-30T23:52:48]
# # [INFO] [2024-11-30T23:52:48] Task Run Time addattribute 0.0295858383178711s
#
# [COMMAND] [2024-11-30T23:52:48]
cp /scratch/226516.1.all.q/xmm/ppsprod/229661/product/P0101640501OBX000CALIND0000.FIT \
/scratch/226516.1.all.q/xmm/ppsprod/229661/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:52:48] System RV 0
# # [INFO] [2024-11-30T23:52:48] Module name: GlobalHK
# # [INFO] [2024-11-30T23:52:48] Instrument: all
# # [INFO] [2024-11-30T23:52:48] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:48] Module version number: 1.81
# [COMMAND] [2024-11-30T23:52:48]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:48]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:48] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:48]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:52:48] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 86010568.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 86010568.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 86010569.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 86010569.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 86010570.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 86010570.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 86010571.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 86010571.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 86010572.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 86010572.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 2138 times 
# # [INFO] [2024-11-30T23:52:48] Task Run Time preqgti 0.383418798446655s
#
# [COMMAND] [2024-11-30T23:52:48]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:48]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:48] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:48]
atthkgen atthkset=product/P0101640501OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:52:49]
# # [INFO] [2024-11-30T23:52:49] Task Run Time atthkgen 0.318166017532349s
#
# [COMMAND] [2024-11-30T23:52:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:49]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:49]
orbit outfile=product/P0101640501OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:52:49] orbit:- Output FITS Orbit timeseries: product/P0101640501OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:52:49] Task Run Time orbit 0.420967102050781s
#
# [COMMAND] [2024-11-30T23:52:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:49]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:49]
radmonfix output=product/P0101640501OBX000RADMON0000.FIT radmonlist=odf/0144_0101640501_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:52:49] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241669.945 which\
#     is outside the time correlation data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241673.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241677.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241681.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241685.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241689.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241693.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241697.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241701.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=7241705.945 which is outside the time correlation\
#     data abscissa range [7242748.72, 7250683.493] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 1156 times 
# # [INFO] [2024-11-30T23:52:49] Task Run Time radmonfix 0.198947906494141s
#
# [COMMAND] [2024-11-30T23:52:49]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226516.1.all.q/xmm/ppsprod/229661/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:49] System RV 0
# # [INFO] [2024-11-30T23:52:49] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:52:49]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226516.1.all.q/xmm/ppsprod/229661/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:49] System RV 0
# [COMMAND] [2024-11-30T23:52:49]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226516.1.all.q/xmm/ppsprod/229661/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:49] System RV 0
# [COMMAND] [2024-11-30T23:52:49]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226516.1.all.q/xmm/ppsprod/229661/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:49] System RV 0
# # [INFO] [2024-11-30T23:52:49] Module name: ExpChooser
# # [INFO] [2024-11-30T23:52:49] Instrument: om
# # [INFO] [2024-11-30T23:52:49] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:49] Module version number: 1.38
# # [INFO] [2024-11-30T23:52:49] Checking exposure U002 for processability
# # [INFO] [2024-11-30T23:52:49] Filter: Blocked
# # [INFO] [2024-11-30T23:52:49] Instrument mode: UNDEFINED
# # [INFO] [2024-11-30T23:52:49] Exposure duration: -6436
# # [INFO] [2024-11-30T23:52:49] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:52:49] Module name: StampKeywords
# # [INFO] [2024-11-30T23:52:49] Instrument: all
# # [INFO] [2024-11-30T23:52:49] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:49] Module version number: 2.09
# # [INFO] [2024-11-30T23:52:49] Getting ODS version from file\
#     /scratch/226516.1.all.q/xmm/ppsprod/229661/odf/0144_0101640501_SCX00000TCS.FIT
# [COMMAND] [2024-11-30T23:52:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:49]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:49]
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="" realvalue="" set=product/P0101640501OBX000CALIND0000.FIT \
stringvalue="\"229661\" \"0144\" \"2024-12-01T00:52:18\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"12.0.0\" \
\"XMM-Newton/SOC\" \"005\" \"CALIBRATION INDEX FILE\"" -w 10
# # [OUTPUT] [2024-11-30T23:52:49]
# # [INFO] [2024-11-30T23:52:49] Task Run Time addattribute 0.0266869068145752s
#
# [COMMAND] [2024-11-30T23:52:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:49]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:49]
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="" realvalue="" set=product/P0101640501OBX000ATTTSR0000.FIT \
stringvalue="\"229661\" \"0144\" \"2024-12-01T00:52:18\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"12.0.0\" \
\"XMM-Newton/SOC\" \"005\" \"ATTITUDE TIME SERIES\"" -w 10
# # [OUTPUT] [2024-11-30T23:52:49]
# # [INFO] [2024-11-30T23:52:49] Task Run Time addattribute 0.0597379207611084s
#
# [COMMAND] [2024-11-30T23:52:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:49]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:49]
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="" realvalue="" set=product/P0101640501OBX000ORBTSR0000.FIT \
stringvalue="\"229661\" \"0144\" \"2024-12-01T00:52:18\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"12.0.0\" \
\"XMM-Newton/SOC\" \"005\" \"SPACECRAFT ORBIT\"" -w 10
# # [OUTPUT] [2024-11-30T23:52:49]
# # [INFO] [2024-11-30T23:52:49] Task Run Time addattribute 0.047792911529541s
#
# [COMMAND] [2024-11-30T23:52:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:49]
export SAS_RAND_SEED=0101640501
# # [INFO] [2024-11-30T23:52:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0101640501
# [COMMAND] [2024-11-30T23:52:49]
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="" realvalue="" set=product/P0101640501OBX000RADMON0000.FIT \
stringvalue="\"229661\" \"0144\" \"2024-12-01T00:52:18\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"12.0.0\" \
\"XMM-Newton/SOC\" \"005\" \"RADMON RATE\"" -w 10
# # [OUTPUT] [2024-11-30T23:52:49]
# # [INFO] [2024-11-30T23:52:49] Task Run Time addattribute 0.0420329570770264s
#
# [COMMAND] [2024-11-30T23:52:49]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:49] System RV 0
# [COMMAND] [2024-11-30T23:52:49]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:49] System RV 0
# [COMMAND] [2024-11-30T23:52:50]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:52:50] System RV 0
