36
4) RuntheSAStaskodfingest(§4.5.2). Itisonlynecessarytorunitonceonanydataset(andwillcause
problemsifitis runasecondtime). . Ifforsomereasonodfingestmust t bererun,firstdeletethe earlier
*.SAS(thefileproducedbyodfingest).
5) RuntheSAStaskemchain.FromthecommandlineofawindowwhereSAShasbeeninitialized,simply
enter:
emchain
emchainprocessesthedatafrombothMOSinstrumentsproducingcalibratedphotoneventfiles. Ifthe
datasethasmorethanoneexposure,aspecificexposurecanbeaccessedusingtheexposureparameter,
e.g.:
emchain exposure=n
wherenistheexposurenumber.
6) RuntheSAStaskepchain,whichprocessesthedatafromPNinstrumentproducingacalibratedphoton
eventfile.FromthecommandlineofawindowwhereSAShasbeeninitialized,simplyenter:
epchain
Tocreateanout-of-timeeventfile,usethecommand:
epchainwithoutoftime=yes
Addingtheparameterkeepintermediate=nonecausesepchaintodiscardanumberofintermediatefiles.
Oncethechainshavecompletedwithneweventfilesthesameanalysistechniquesdescribedintheprevious
sectionscanused.
5.8 AMore-or-LessCompleteExample
TheLockmanHoleODFdatahavebeenusedforareasonablycompleteexampleoftheEPICdatareduction.
ThedatacanbefoundviatheXSAat:
http://xmm.vilspa.esa.es/xsa/
orviaBrowseat:
http://heasarc.gsfc.nasa.gov/db-perl/W3Browse/w3browse.pl
whilethescript(run.com)andoutput datafiles (exceptfortheunfilteredeventlistswhicharehuge)canbe
foundat:
ftp://legacy.gsfc.nasa.gov/xmm/data/examples/epic/
ThescriptassumesthatSASV6.0hasbeensetuptorun. ThecommandstosettheCCFandODFdirectories
aswellastheccf.ciffileareincludedbutwillneedtobechangedforthespecificsetup. Thedatawereprocessed
usingSASV6.0.
TheentireprocesstooktwohoursonarelativelynewlinuxRH7.3machine(1.67GHzprocessor,2GB
RAM).Theresultisaboutagigabyteofnewfiles.ThescriptusestheSAScommand-lineinterface,howeverin
itscreationtheGUIinterfacetoxmmselectwasusedtofindthetimefilteringandsourceextractionparameters.
Thescriptgoesthroughthefollowingsteps.
1) SetsafewSASparameters.
2) RunscifbuildandodfingesttoprepareforSASanalysis.
3) RunsemchaintoproducecalibratedphotoneventfilesfortheMOS1andMOS2detectors
4) CreatesimagesandlightcurvesoftheMOSdata
5) FilterstheMOSeventfilestoexcludebadeventsandtimesofbackgroundflares
6) CreatesimagesandlightcurvesofthefilteredMOSdata
7a) RunsepchaintoproduceacalibratedphotoneventfileforthePNdetector
7b) RunsepchainasecondtimetoproduceacalibratedphotoneventfileforthePNdetectorofout-of-time
events
8) Repeatsitems4-6forthePNdata
9) Doessourcedetectionfortwobandsforeachofthethreedetectors
Pdf metadata - add, remove, update PDF metadata in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Allow C# Developers to Read, Add, Edit, Update and Delete PDF Metadata
pdf xmp metadata editor; search pdf metadata
Pdf metadata - VB.NET PDF metadata library: add, remove, update PDF metadata in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Enable VB.NET Users to Read, Write, Edit, Delete and Update PDF Document Metadata
remove metadata from pdf online; pdf metadata
37
10) Extractssourceandbackgroundspectraforabrighterfieldsource
11) CreatesanRMFsandARFsforthesource
12) Groupsthespectrausinggrppha
13) Includedinthescript,butcommentedout,arethecommandstofitthesourcespectrausingXspec
14) Createsalightcurveforthesource
15) Includedinthe e script, butcommentedout, arethecommands to analyzethesourcelight curve using
Xronos
How to C#: Modify Image Metadata (tag)
edit, C#.NET PDF pages extract, copy, paste, C#.NET rotate PDF pages, C#.NET search text in PDF, C#.NET edit PDF bookmark, C#.NET edit PDF metadata, C#.NET
batch update pdf metadata; edit pdf metadata online
C# TIFF: TIFF Metadata Editor, How to Write & Read TIFF Metadata
C# TIFF - Edit TIFF Metadata in C#.NET. Allow Users to Read and Edit Metadata Stored in Tiff Image in C#.NET Application. How to Get TIFF XMP Metadata in C#.NET.
remove pdf metadata online; add metadata to pdf programmatically
Chapter6
FirstLook–RGSData
Beforebeginningthischapterpleaseconsultthe“watchout”pageattheVILSPASOC:
• http://xmm.vilspa.esa.es/sas/documentation/watchout
Thiswebsitediscusses currentandpast SASbugsandanalysisissues,e.g.,regardingmissinglibraries when
usingrgsprocwithSASV6.
6.1 APRELIMINARYFIT
6.1.1 PipelineProducts
YouwillfindavarietyofRGS-specificfilesinXMM-Newtondatasets. Generallytherearetwoofeachbecause
therearetwoRGSinstruments. Table6.1lists s typicalfilenames,their purpose,thefileformat,andalistof
tools thatwill l enabletheuser r toinspect their data. . As s usual, , therearesomeHTML L products tohelpyou
inspectthedatawithfilenamesoftheform(notethatwewillusethegenericformofthenameinthefollowing
examples):
• PPiiiiiijjkkAAAAAA000
0.HTM,where
iiiiii–proposalnumber
jj–observationID-targetnumberinproposal
kk–observationID-observationnumberfortarget
AAAAAA–GroupID(Table6.1)
NOTE:Theten-digitcombinationofiiiiiijjkkistheobservationnumberandisusedrepetitively
throughoutthefilenomenclature
TheINDEX.HTMLfilewillhelpyounavigate. Thedatafilenamesareoftheform:
• PiiiiiijjkkaablllCCCCCCnmmm.zzz,where
iiiiii–proposalnumber
jj–observationID-targetnumberinproposal
kk–observationID-observationnumberfortarget
aa–detector,R1–RGS1,R2–RGS2
b–Sforscheduledobservation,Uforunscheduled
lll–exposurenumber
CCCCCC–fileidentification(Table6.1)
n–spectralordernumber,unimportantotherwise
mmm–sourcenumber
zzz–filetype(e.g.,PDF,PNG,FTZ,HTM)
38
VB.NET PDF Library SDK to view, edit, convert, process PDF file
PDF Metadata Edit. Offer professional PDF document metadata editing APIs, using which VB.NET developers can redact, delete, view and save PDF metadata.
remove metadata from pdf acrobat; pdf metadata viewer online
C# PDF Library SDK to view, edit, convert, process PDF file for C#
accordingly. Multiple metadata types of PDF file can be easily added and processed in C#.NET Class. Capable C#.NET: Edit PDF Metadata. PDF SDK
pdf metadata editor; edit multiple pdf metadata
39
Table6.1: RGSPipelineProcessingdatafiles.
GroupID
FileID
Contents
FileType
ViewWith
REVLIS
SRCLI
RGSSourceLists
ZippedFITS
fv
EVENLI
RGSEventlists
ZippedFITS
xmmselect,fv
REXPIM
EXPMAP
RGSExposureMaps
ZippedFITS
ds9,Ximage,fv
RSPECT
SRSPEC1 1stOrderSourceSpectra
ZippedFITS
Xspec,fv
SRSPEC2 2ndOrderSourceSpectra ZippedFITS
Xspec,fv
BGSPEC1 1stOrderBack. . Spectra
ZippedFITS
Xspec,fv
BGSPEC2 2ndOrderBack.Spectra
ZippedFITS
Xspec,fv
SRSPEC
SpectraPlots
PDFformat
Acrobatreader
RIMAGE
ORDIMG
Images,disp.vs.X-disp
ZippedFITS,PNG
ds9,Ximage,fv,Netscape
IMAGE
Images,disp.vs.PI
ZippedFITS,PNG
ds9,Ximage,fv,Netscape
FTZ–gzippedFITSformat,useds9,Ximage,Xselect,fv
PNG–useNetscapeorotherwebbrowser
HTM–useNetscapeorotherwebbrowser
PDF–PortableDataFormat,useAcrobatReader
6.1.2 PreparationforRunning g SASTasks
1)EnsurethatyouhavecreatedaCalibrationIndexFile,usingcifbuild(§4.5.1).
2)EnsurethatyouhavecreatedasummaryfileofyourODFconstituents(justonce)anddepositeditinyour
ODFdirectoryusingtheSAStaskodfingest(§4.5.2).
6.1.3 CreatingResponse e Matrices
Responsematricesandancillaryresponsefilesarenotprovidedas partofthepipelineproductpackage,soa
usermustcreatetheirownbeforeanalyzingdata.TheSASpackagergsrmfgengeneratesanRMFandARFand
combinesthemwithinasingleRSPfile.Thefollowingcommanddemonstratesthisusingthepipelineproducts
above:
• rgsrmfgen n file=RGS1
ORDER1.RSP evlist=PiiiiiijjkkaablllEVENLInmmm.FTZ Z withspectrum=yes
spectrumset=PiiiiiijjkkaablllSRSPEC1mmm.FTZ emin=0.3 emax=2.8 ebins=4000
> file–thenameoftheoutputresponsematrix.
> evlist–theeventlistfromwhichthespectrumwasextracted.
> withspectrum–UsethespectrumfileproducttocalculatetheRMF.
> spectrumset–nameofthespectrumfile e fromthe pipeline products. . Source,order,background,
andresponsechannelbinningwillbetakenfromthisfile.
> emin–thelowerenergylimitoftheRSPfile.
> emax–theupperenergylimitoftheRSPfile.
> ebins–Thenumberofbinscalculatedbetweeneminandemax. Thetaskdocumentationsuggests
thisnumberbe>3000.
How to C#: Basic SDK Concept of XDoc.PDF for .NET
XDoc.PDF for .NET supports editing PDF document metadata, like Title, Subject, Author, Creator, Producer, Keywords, Created Date, and Last Modified Date.
edit pdf metadata; pdf xmp metadata
VB.NET PDF File Compress Library: Compress reduce PDF size in vb.
Document and metadata. All object data. File attachment. Flatten visible layers. VB.NET Demo Code to Optimize An Exist PDF File in Visual C#.NET Project.
preview edit pdf metadata; add metadata to pdf file
40
Theresponsefilestakemanyfactorsintoaccount,suchaspointing,pile-up,telemetrysaturation,hotpixels,
instrument temperatures,etc. . Thereforeitisimperativetocreatenewresponsefilesafteranyfilteringofthe
dataandthesameresponseshouldneverbeusedforfittingtwodifferentobservationsorpointings.
NotethatifthepipelineproductswerecreatedwithSASv5.0thisprocedurewillfailbecauseofamorerecent
codealteration. Toconstruct t aresponsematrix,the pipelineshouldbere-runfirstusingthelatestsoftware
(SASV6)andcalibration.
6.1.4 FittingaSpectralModeltotheData
NowuseXSPECtofitanappropriatemodeltoyourspectrum:
xspec
XSPEC>data PiiiiiijjkkaablllSRSPEC1mmm.FTZ
XSPEC>back PiiiiiijjkkaablllBGSPEC1mmm.FTZ
XSPEC>resp RGS1
ORDER1.RSP
XSPEC>ignore bad
XSPEC>model wabs*mekal
wabs:nH>1
mekal:kT>1
mekal:nH>
mekal:Abundanc>0.4
mekal:Redshift>
mekal:Switch>0
mekal:norm>1
XSPEC>renorm
XSPEC>fit
XSPEC>setplot device e /xs
XSPEC>setplot wave
XSPEC>setplot command d window w all
XSPEC>setplot command d log g x x off
XSPEC>setplot command d wind d 1
XSPEC>setplot command d r y y 1e-5 1.6
XSPEC>setplot command d wind d 2
XSPEC>setplot command d r y y -9.99 9.99
XSPEC>plot data a residuals
XSPEC>exit
Do you really y want to o exit? ? (y)y
TheplotisprovidedinFigure6.1.
Pleasenote:
• PiiiiiijjkkaablllSRSPECnmmm.FTZisa“net”spectrum. . Thisisthesource+backgroundeventsminusthe
backgroundeventswhichwereextractedfrom adifferent detectorregion. . Anumberofxspecfunctions
willyielderroneousresultsusingnetspectra–seeSec.6.6
• PiiiiiijjkkaaSlllBGSPECnmmm.FTZisabackgroundspectrum.Consequently,whenanalyzingthenetfile
withXSPECor CIAO,DONOTemploy this fileasa a backgroundfor r your data. . Ithas s alreadybeen
subtracted.
VB.NET PDF Image Extract Library: Select, copy, paste PDF images
Get image information, such as its location, zonal information, metadata, and so on. Extract image from PDF free in .NET framework application with trial SDK
batch pdf metadata editor; online pdf metadata viewer
C# PDF File Compress Library: Compress reduce PDF size in C#.net
Comments, forms and multimedia. Document and metadata. All object data. Detect and merge image fragments. Flatten visible layers. C#.NET DLLs: Compress PDF Document
add metadata to pdf; embed metadata in pdf
41
Figure6.1: 1storderRGS1spectrumofABDor.Thefitisanabsorbedsingle-temperaturemekalmodel. The
gapbetween10–15
˚
AisduetotheabsenceofCCD7.
6.2 FILTERINGEVENTS
Solarflaresresultinperiodsofhighbackground.Observersmayfindanappreciableincreaseinsignal-to-noise
iftheyremoveflareeventsfromtheirdata. ThegeneralSAStaskevselectdoesnotcorrecttheRGSexposure
mapsduringfilteringwhichisvitalinordertofitdataaccurately. ConsequentlytheRGS-specifictaskrgsfilter
mustberuninordertoperformanyfilteringofthedata. AswiththemajorityofRGStasks,rgsfiltercanbe
calledfromthemeta-taskrgsprocwhichprovidesaconvenientinterfacebetweentheuserandtheentireRGS
pipeline.Thissectionprovidesanexampleofhowtoproduceatime-filteredspectrum.
6.2.1 Creatingandplottingalightcurve
CreateaFITSlightcurvewith100secondbinningfromthepipelineproducteventfileusingtheSAStaskevselect
(alternatively use the xmmselectGUI).Beingcloser totheopticalaxis, CCD9ismost susceptibleto proton
eventsandgenerallyrecordstheleastsourceevents,thereforewewillextracteventsoverthisCCDonly.Also,to
avoidconfusingsolarflaresforsourcevariability,aregionfilterthatthatremovesthesourcefromthefinalevent
listshouldbeused.TheregionfiltersarekeptinthesourcefileproductPiiiiiijjkkaablllSRCLI
nmmm.FTZ
• evselect t table=PiiiiiijjkkaablllEVENLInmmm.FTZ withrateset=yes rateset=RGS1
RATE.FIT
makeratecolumn=yes maketimecolumn=yes timebinsize=100
expression=’(CCDNR==9)&&(REGION(PiiiiiijjkkaablllSRCLI
nmmm.FTZ:RGS1
BACKGROUND,
BETA
CORR,XDSP
CORR))’
> table–eventlistfromthepipelineproducts.
> withrateset–createalightcurve.
> rateset–nameoftheresultingFITSfile.
> makeratecolumn–createaratecolumn.
> maketimecolumn–createatimecolumn.
> timebinsize–binthetimecolumntothissize(inunitsofseconds).
> expression–filterexpression.
PlotthelightcurveusingtheSAStooldsplot(seeFigure6.2):
• dsplot t table=RGS1
RATE.FIT x=TIME y=RATE
42
Figure6.2: BackgroundeventratefromtheRGS1CCD9chip.Theflaresaresolarevents.Thetimeunitsare
elapsedmissiontime.
9.639e+07
9.64e+07
9.641e+07
9.642e+07
9.643e+07
9.644e+07
9.645e+07
TIME [s]
0
0.2
0.4
0.6
0.8
1
RATE [count/s]
R1_RATE.FIT
RATE
6.2.2 Creating a GTI file
The CCD9 quiescent count rate within the background region mask is ∼ 0.05 counts per second. In this example
there are two intervals of significant background flaring. Determine which intervals should be rejected and write
these time intervals to an ASCII file, gti.asc, as follows:
9.6405e7 9.6413e7 −
9.6422e7 9.6425e7 −
The first two columns provide the start and stop times (in seconds since the start of the mission) of intervals
to be filtered. The third column can be a ’+’ (good time interval) or ’−’ (bad time interval). In this case two
intervals of high background activity are excluded.
Execute gtibuild to convert the above into a FITS format GTI file:
• gtibuild file=gti.asc table=GTI.FIT
> file – ASCII file of time intervals
> table – GTI FITS file
Alternatively, a GTI table can be created using a Boolean expression to record times of acceptably low count
rate with the task tabgtigen:
• tabgtigen table=R1
RATE.FIT gtiset=GTI.FIT expression=’(RATE<0.2)’
> table – Input data file.
> gtiset – Output GTI table.
> expression – Boolean expression.
6.2.3 Running the RGS Pipeline
One can now re-run the complete RGS pipeline using the SAS meta-task rgsproc.
43
Table 6.2: rgsproc output data files.
Data Type Extension File Type
Contents
ATTTSR
FIT
FITS table
attitude information for the complete observation.
attgti
FIT
FITS table
good time intervals from the attitude history.
hkgti
FIT
FITS table
good time intervals from the housekeeping files.
SRCLI
FIT
FITS table
list of sources and extraction masks.
merged
FIT
FITS table
event list merged from all CCDs.
EVENLI
FIT
FITS table
merged and filtered event list.
EXPMAP
FIT
FITS image exposure map.
SRSPEC
FIT
FITS table
source spectrum.
BGSPEC
FIT
FITS table
background spectrum.
matrix
FIT
FITS table
response matrix.
fluxed
FIT
FITS table
fluxed spectrum. For quick and dirty inspection only.
• rgsproc orders=’1 2’ auxgtitables=GTI.FIT bkgcorrect=no withmlambdacolumn=yes
> orders – the spectral orders to extract.
> auxgtitables – a list of GTI files
> bkgcorrect – Subtract background from source spectra?
> withmlambdacolumn – include a wavelength column in the event file product (we will use this to
generate a “dirty” spectrum plot later).
Note: If an error message that a library is missing occurs, follow these steps:
• go to the XMM-Newton SAS v6.0 ftp site ftp://xmm.vilspa.esa.es/pub/sas/6.0.0/
• go to the directory which contains the SAS V6 version for your platform
• download the package: platform-htrframes.tar.gz
• go to your $SAS
DIR
• gunzip platform-htrframes.tar.gz
• tar -xvf platform-htrframes.tar
bkgcorrect=no will yield a source spectrum with background events included. The background level will be
automatically subtracted if bkgcorrect=yes. Unless the spectra are of high signal-to-noise, it is recommended
that scientific analysis only be carried out on those spectra where bkgcorrect=no. However, note that the fluxed
spectrum (which is only suitable for initial data inspection) is best examined at after declaring bkgcorrect=yes.
New files are written to the working directory. Table 6.2 lists these, and all are uncompressed FITS files. The
filenames are of the same form given in Section 6.1.1:
Even if no solar flares occurred during the observation, it is recommended that the pipeline is re-run in order to
take advantage of the most up-to-date calibration and ensure that region filters more appropriate for the source
are created.
6.2.4 Inspecting New Products
To take a first look at these new products try the following recipes.
1) To examine images of dispersion versus PI and cross-dispersion directions:
44
Figure 6.3: Images over the dispersion–cross-dispersion plane (top) and the dispersion–pulse height plane (bot-
tom). The lower and upper bananas are 1st and 2nd order events respectively. The blue lines define the source
extraction regions, one spatial and the other over PI. Horizontal blue lines delineate the internal calibration
sources. The regular chevron background pattern in the right hand CCDs (1 and 2) are a manifestation of
electronic cross-talk. These events have low PI values and are filtered out by the PI masks.
• set srclst = ’PiiiiiijjkkaablllSRCLI
nmmm.FIT’
• evselect table=PiiiiiijjkkaablllEVENLInmmm.FIT:EVENTS withimageset=yes
imageset=spatialimage.fit xcolumn=BETA
CORR ycolumn=XDSP
CORR
> table – input events table.
> withimageset – create an image.
> imageset – output image file.
> xcolumn – column in events file to extract
45
> ycolumn – column in events file to extract
• evselect table=PiiiiiijjkkaablllEVENLInmmm.FIT:EVENTS withimageset=yes
imageset=orderimage.fit xcolumn=BETA
CORR ycolumn=PI withyranges=yes yimagemin=0
yimagemax=3000 expression=’region($srclst:RGS1
SRC1
SPATIAL,BETA
CORR,XDSP
CORR)’
> withyranges – set the y range of the image.
> yimagemin – minimum y limit.
> yimagemax – maximum y limit.
> expression – filter expression. This example is filtering events found inside the spatial mask for the
source.
• rgsimplot withspatialset=yes withendispset=yes spatialset=spatialimage.fit
endispset=orderimage.fit withspatialregionsets=yes withendispregionsets=yes
srclistset=$srclst srcidlist=1 orderlist=’1 2’ colourmap=LOG colour=3 device=/XS
> withspatialset – include spatial image.
> withendispset – include PI image.
> spatialset – name of spatial image.
> endispset – name of PI image.
> withspatialregionsets – include spatial mask in plot.
> withendispregionsets – include PI mask in plot.
> srclistset – name of source list.
> srcidlist – source number of the target within the source list. Source 1 will correspond to the
target coordinates provided in the original proposal. Source 2 will be the camera boresight.
> orderlist – order of masks to plot
> colourmap – colour scale.
> colour – colour scheme for plot.
> device – plotting device (upper case is mandatory; e.g., /XS, /XSERVE, /PS, /CPS)
The output from rgsimplot is provided in Figure 6.3.
2) To plot a light curve from all events:
• evselect table=PiiiiiijjkkaablllEVENLInmmm.FIT:EVENTS withrateset=yes
rateset=PiiiiiijjkkaablllRATES
nmmm.FIT makeratecolumn=yes maketimecolumn=yes
timebinsize=100
> table – input event list.
> withrateset – create a light curve.
> rateset – name of output light curve.
> maketimecolumn – include an absolute time column.
> makeratecolumn – create a rate column.
> timebinsize – bin size (in seconds).
• dsplot table=PiiiiiijjkkaablllRATES
nmmm.FIT x=TIME y=RATE
The resulting curve is provided in Figure 6.4. Note that unlike Figure 6.2 these events have been extracted
across the whole detector and that our Good Time constraint has been adhered to.
3) To plot a spectrum with an approximate wavelength scale, use the mlambda table column rather than a
response matrix. One important caveat here is that all orders are superimposed on this table:
Documents you may be interested
Documents you may be interested