
#!/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:46:16] Module name: VerifyODF
# # [INFO] [2024-11-30T23:46:16] Instrument: all
# # [INFO] [2024-11-30T23:46:16] Stream no.: 0001
# # [INFO] [2024-11-30T23:46:16] Module version number: 1.18
# # [INFO] [2024-11-30T23:46:16] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:46:16] Module name: MakeCIF
# # [INFO] [2024-11-30T23:46:16] Instrument: all
# # [INFO] [2024-11-30T23:46:16] Stream no.: 0001
# # [INFO] [2024-11-30T23:46:16] Module version number: 1.23
# # [INFO] [2024-11-30T23:46:16] Observation start defined as >2003-07-31T14:19:37.000<
# # [INFO] [2024-11-30T23:46:16] Processing date defined as >2024-12-01T00:46:16<
# [COMMAND] [2024-11-30T23:46:16]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:16]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:16] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46:16]
cifbuild analysisdate=2024-12-01T00:46:16 calindexset=product/P0045340301OBX000CALIND0000.FIT fullpath=no \
observationdate=2003-07-31T14:19:37.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:46:48]
# # [INFO] [2024-11-30T23:46:48] Task Run Time cifbuild 32.075012922287s
#
# [COMMAND] [2024-11-30T23:46:48]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:48]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:48] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46:48]
addattribute attributecomment="\"Telescope (mission) name\" \"Date observations were made\" \"Date observations ended\" \"RA of \
instrument pointing (degrees)\" \"Name of PI\" \"Observation identifier\" \"Observation mode (pointing or slew)\" \"DEC of \
instrument pointing\" \"Name of observed object\"" attributename="TELESCOP DATE-OBS DATE-END RA_PNT OBSERVER OBS_ID OBS_MODE DEC_PNT \
OBJECT" attributetype="string string string real string string string real string" realvalue="219.900834 -60.8352777" \
set=product/P0045340301OBX000CALIND0000.FIT stringvalue="\"XMM\" \"2003-07-31T14:19:37.000\" \"2003-07-31T14:19:58.000\" \"Prof \
Jurgen Schmitt\" \"0045340301\" \"POINTED\" \"Alpha Centauri\"" -w 10
# # [OUTPUT] [2024-11-30T23:46:48]
# # [INFO] [2024-11-30T23:46:48] Task Run Time addattribute 0.0406160354614258s
#
# [COMMAND] [2024-11-30T23:46:48]
cp /scratch/226006.1.all.q/xmm/ppsprod/229154/product/P0045340301OBX000CALIND0000.FIT \
/scratch/226006.1.all.q/xmm/ppsprod/229154/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:46:48] System RV 0
# # [INFO] [2024-11-30T23:46:48] Module name: GlobalHK
# # [INFO] [2024-11-30T23:46:48] Instrument: all
# # [INFO] [2024-11-30T23:46:48] Stream no.: 0001
# # [INFO] [2024-11-30T23:46:48] Module version number: 1.81
# [COMMAND] [2024-11-30T23:46:48]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:48]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:48] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46:48]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:46:49] ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.0699463s between AHF entries 69\
#     (2003-07-31T13:53:00.000) and 70 (2003-07-31T14:26:58.000) - adjusting duration of entry 69 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.0699463s between AHF entries 69\
#     (2003-07-31T13:53:00.000) and 70 (2003-07-31T14:26:58.000) - adjusting duration of entry 69 accordingly
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 176048899.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 176048899.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 176048900.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 176048900.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 176048901.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 176048901.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 176048902.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 176048902.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 176048903.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 176048903.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 32 times 
# # [INFO] [2024-11-30T23:46:49] Task Run Time preqgti 0.215913057327271s
#
# [COMMAND] [2024-11-30T23:46:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:49]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46:49]
atthkgen atthkset=product/P0045340301OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:46:49] ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.0699463s between AHF entries\
#     69 (2003-07-31T13:53:00.000) and 70 (2003-07-31T14:26:58.000) - adjusting duration of entry 69 accordingly 
# # [INFO] [2024-11-30T23:46:49] Task Run Time atthkgen 0.127454996109009s
#
# [COMMAND] [2024-11-30T23:46:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:49]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46:49]
orbit outfile=product/P0045340301OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:46:49] orbit:- Output FITS Orbit timeseries: product/P0045340301OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.0699463s between AHF entries 69 (2003-07-31T13:53:00.000) and 70\
#     (2003-07-31T14:26:58.000) - adjusting duration of entry 69 accordingly 
# # [INFO] [2024-11-30T23:46:49] Task Run Time orbit 0.0659050941467285s
#
# [COMMAND] [2024-11-30T23:46:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:49]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46:49]
radmonfix output=product/P0045340301OBX000RADMON0000.FIT radmonlist=odf/0667_0045340301_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:46:49] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97280581.95 which\
#     is outside the time correlation data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290673.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290677.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290681.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290685.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290689.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290693.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290697.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290701.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=97290705.95 which is outside the time correlation\
#     data abscissa range [97280994.3, 97290570.42] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 157 times 
# # [INFO] [2024-11-30T23:46:49] Task Run Time radmonfix 0.113458871841431s
#
# [COMMAND] [2024-11-30T23:46:49]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226006.1.all.q/xmm/ppsprod/229154/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:46:49] System RV 0
# # [INFO] [2024-11-30T23:46:49] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:46:49]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226006.1.all.q/xmm/ppsprod/229154/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:46:49] System RV 0
# [COMMAND] [2024-11-30T23:46:49]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226006.1.all.q/xmm/ppsprod/229154/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:46:49] System RV 0
# [COMMAND] [2024-11-30T23:46:49]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226006.1.all.q/xmm/ppsprod/229154/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:46:49] System RV 0
# # [INFO] [2024-11-30T23:46:49] Module name: ExpChooser
# # [INFO] [2024-11-30T23:46:49] Instrument: om
# # [INFO] [2024-11-30T23:46:49] Stream no.: 0001
# # [INFO] [2024-11-30T23:46:49] Module version number: 1.38
# # [INFO] [2024-11-30T23:46:49] Checking exposure S400 for processability
# # [INFO] [2024-11-30T23:46:49] Filter: Blocked
# # [INFO] [2024-11-30T23:46:49] Instrument mode: IntensifierCharacteristics
# # [INFO] [2024-11-30T23:46:49] Exposure duration: 21
# # [INFO] [2024-11-30T23:46:49] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:46:49] Module name: StampKeywords
# # [INFO] [2024-11-30T23:46:49] Instrument: all
# # [INFO] [2024-11-30T23:46:49] Stream no.: 0001
# # [INFO] [2024-11-30T23:46:49] Module version number: 2.09
# # [INFO] [2024-11-30T23:46:49] Getting ODS version from file\
#     /scratch/226006.1.all.q/xmm/ppsprod/229154/odf/0667_0045340301_SCX00000TCS.FIT
# [COMMAND] [2024-11-30T23:46:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:49]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46: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/P0045340301OBX000CALIND0000.FIT \
stringvalue="\"229154\" \"0667\" \"2024-12-01T00:46:16\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"14.0.0\" \
\"XMM-Newton/SOC\" \"002\" \"CALIBRATION INDEX FILE\"" -w 10
# # [OUTPUT] [2024-11-30T23:46:49]
# # [INFO] [2024-11-30T23:46:49] Task Run Time addattribute 0.0584828853607178s
#
# [COMMAND] [2024-11-30T23:46:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:49]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46: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/P0045340301OBX000ATTTSR0000.FIT \
stringvalue="\"229154\" \"0667\" \"2024-12-01T00:46:16\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"14.0.0\" \
\"XMM-Newton/SOC\" \"002\" \"ATTITUDE TIME SERIES\"" -w 10
# # [OUTPUT] [2024-11-30T23:46:49]
# # [INFO] [2024-11-30T23:46:49] Task Run Time addattribute 0.0711588859558105s
#
# [COMMAND] [2024-11-30T23:46:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:49]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46: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/P0045340301OBX000ORBTSR0000.FIT \
stringvalue="\"229154\" \"0667\" \"2024-12-01T00:46:16\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"14.0.0\" \
\"XMM-Newton/SOC\" \"002\" \"SPACECRAFT ORBIT\"" -w 10
# # [OUTPUT] [2024-11-30T23:46:49]
# # [INFO] [2024-11-30T23:46:49] Task Run Time addattribute 0.0554280281066895s
#
# [COMMAND] [2024-11-30T23:46:49]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:46:49]
export SAS_RAND_SEED=0045340301
# # [INFO] [2024-11-30T23:46:49] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0045340301
# [COMMAND] [2024-11-30T23:46: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/P0045340301OBX000RADMON0000.FIT \
stringvalue="\"229154\" \"0667\" \"2024-12-01T00:46:16\" \"1\" \"21.51_20241115_1113\" \"xmmsas_20241108_1150-21.0.0\" \"14.0.0\" \
\"XMM-Newton/SOC\" \"002\" \"RADMON RATE\"" -w 10
# # [OUTPUT] [2024-11-30T23:46:49]
# # [INFO] [2024-11-30T23:46:49] Task Run Time addattribute 0.0709781646728516s
#
# [COMMAND] [2024-11-30T23:46:49]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits
# # [INFO] [2024-11-30T23:46:49] System RV 0
# [COMMAND] [2024-11-30T23:46:49]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:46:49] System RV 0
# [COMMAND] [2024-11-30T23:46:49]
gzip --rsyncable -f intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:46:49] System RV 0
