Up to top level
AO15   AO16   AO17   AO18   AO19   Backgrounds   Calibration   Conference   Data   Docs   EPICMOS   EPICpn   Feedback   Gallery   Misc   OM   Pending   PhD_Theses   Publications   RGS   RadMonitor   SAS_Hardware   SAS_WS   SASv16.0   SASv16.0_Installation   SASv16.1   SASv16.1_Installation   SASv17.0   SASv17.0_Installation   SASv18.0   SASv18.0_Installation   SciSim   Simulators_other   Suggestions   Trash   Visibility   XMM-bouncing   XMM-news   XRPS   XSA   esas   incoming  

Logged in as guest

Viewing esas/48058
Full headers

From: donic@matf.bg.ac.rs
Subject: problems with mos/pn-spectra
Compose reply
Download message
Move To:
5 replies: 1 2 3 4 5
3 followups: 1 2 3

Private message: yes  no

Notes:

Notification:


Date: Sun, 19 Jun 2011 22:50:34 +0200 (CEST)
Subject: problems with mos/pn-spectra
From: donic@matf.bg.ac.rs
To: xmmhelp@sciops.esa.int
------=_20110619225034_83492
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Dear Ignacio,

Thank You very much for the help during the Workshop. The Workshop was
very useful and excellent organized.

I started the analysis from the beginning (I am interested in the analysis
of the spectra of SNR W44) but the same error is present in mos-spectra
and pn-spectra that prevents me to run mos_back and pn_back. I am sanding
You, in the attachment, the full log list of all I have done
(W44_0551060101_analysis_script.txt and logs for all tasks). esas_caldb is
from the Workshop CD (I just copied the directory without the extraction
of .gz's). I am sending You the results of the analysis done on my laptop.
The same results I got on my desktop. I would like to ask You, if You have
time, if You can find where is my error.

If I can not proceed with mos/pn-spectra, I have several questions:

1. Can I use the result products of emchain and epchain as well as
mos-filter and pn-filter (mos1S001-obj-image-det.fits,
mos2S002-obj-image-det.fits, pnU002-obj-image-det.fits) for further
analysis without using mos-spectra and pn-spectra but using the
"Extraction of MOS/pn spectra from point-like sources" threads ? In that
case I will use the "How to extract background spectra from blank fields
event lists" for the background spectra. On the other hand if, I use
mos1S001-obj-image-det.fits, mos2S002-obj-image-det.fits,
pnU002-obj-image-det.fits then the extraction of point-like sources (with
cheese) is not done ?

2. I do not fully understand which type I need, unfilled or ghosted 
background event file?

3. Can You suggest me how to proceed ?

I am sorry for so many questions.

Thank You very much in advance,
Dusan Onic


###########################################################################

# My Laptop (Fuitsu Simens Esprimo Mobile) has 3GB RAM (Ubuntu 10.04 see
2.7 GB)

donic@donic-laptop:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          2769        793       1975          0        147        359
-/+ buffers/cache:        286       2482
Swap:         3851          0       3851

donic@donic-laptop:~$ sudo dmidecode | grep Size | grep MB
[sudo] password for donic:
	Size: 1024 MB
	Size: 2048 MB

donic@donic-laptop:~$ uname -a
Linux donic-laptop 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 09:00:03
UTC 2010 i686 GNU/Linux

# I have sas_11.0.0-Ubuntu8.04-32.tgz installed (v11.0.0 with added patch
11.0.1 to SAS 11.0.0 during the Workshop - E. Ojero checked that patch is
added correctly)

###########################################################################

# My Desktop has only 1 GB RAM

donic@donic-desktop:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           994        659        334          0         62        308
-/+ buffers/cache:        287        706
Swap:         2908          0       2908

donic@donic-desktop:~$  sudo dmidecode | grep Size | grep MB
[sudo] password for donic:
	Maximum Memory Module Size: 2048 MB
	Maximum Total Memory Size: 4096 MB
	Installed Size: 1024 MB (Double-bank Connection)
	Enabled Size: 1024 MB (Double-bank Connection)
	Size: 1024 MB

donic@donic-desktop:~$ uname -a
Linux donic-desktop 2.6.32-24-generic #42-Ubuntu SMP Fri Aug 20 14:24:04
UTC 2010 i686 GNU/Linux

# I have sas_11.0.0-Ubuntu8.04-32.tgz installed (the new version of SAS,
installed two days ago)
------=_20110619225034_83492
Content-Type: text/plain; name="odfingest_log.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="odfingest_log.txt"

odfingest:- Executing (routine): odfingest odfdir=. withodfdir=no outdir=.
summaryfile=0000_0000000000_SCX000SUM.SAS usecanonicalname=yes writepath=yes
findinstrumentmodes=yes usehousekeeping=yes oalcheck=no  -w 3 -V 3
odfingest:- Identified the following ODF
Revolution:  1717
Observation: 0551060101
Proposal:    0551060101
odfingest:- Detected a data set with data mode 5 [Diagnostic]. This is know to
contain the wrong DATE-END. I'm assigning to it an arbitrary duration of 1
second.
odfingest:- Detected a data set with data mode 5 [Diagnostic]. This is know to
contain the wrong DATE-END. I'm assigning to it an arbitrary duration of 1
second.
odfingest:- Detected a data set with data mode 5 [Diagnostic]. This is know to
contain the wrong DATE-END. I'm assigning to it an arbitrary duration of 1
second.
odfingest:- Detected a data set with data mode 5 [Diagnostic]. This is know to
contain the wrong DATE-END. I'm assigning to it an arbitrary duration of 1
second.
odfingest:- Detected a data set with data mode 5 [Diagnostic]. This is know to
contain the wrong DATE-END. I'm assigning to it an arbitrary duration of 1
second.
odfingest:- Detected a data set with data mode 5 [Diagnostic]. This is know to
contain the wrong DATE-END. I'm assigning to it an arbitrary duration of 1
second.
odfingest:- Detected a data set with data mode 5 [Diagnostic]. This

Message of length 1150993 truncated

Reply 1

Resend
From: Ignacio de la Calle <xmmhelp@sciops.esa.int>
To: donic@matf.bg.ac.rs
Subject: Re: problems with mos/pn-spectra (PR#48058)
Date: Mon Jun 20 10:46:15 2011
Dear Dusan,

> Thank You very much for the help during the Workshop. The Workshop was
> very useful and excellent organized.

Well, I am glad it was useful.
 
Yes, I can see the same error happening.

** evselect: error (FITSIO), FITS error 112: cannot write to readonly file
cannot open compressed file with WRITE access (mem_compress_open)
filtered.fits
failed to find or open the following file: (ffopen)
filtered.fits

> 1. Can I use the result products of emchain and epchain as well as
> mos-filter and pn-filter (mos1S001-obj-image-det.fits,
> mos2S002-obj-image-det.fits, pnU002-obj-image-det.fits) for further
> analysis without using mos-spectra and pn-spectra but using the
> "Extraction of MOS/pn spectra from point-like sources" threads ? In that
> case I will use the "How to extract background spectra from blank fields
> event lists" for the background spectra. On the other hand if, I use
> mos1S001-obj-image-det.fits, mos2S002-obj-image-det.fits,
> pnU002-obj-image-det.fits then the extraction of point-like sources (with
> cheese) is not done ?

Yes, you can use the same products. After you run emchain and epchain and 
filter them with mos-filter and pn-filter you will have clean event files 
for you to use with whatever other tasks afterwards. 

You can also run cheese if you want to. Look at the documentation. Cheese 
requieres name files as output from mos-filter and pn-filter, but since you
have already run them, you can run cheese as well with further changes:

http://xmm.esac.esa.int/sas/current/doc/cheese/cheese.html

> 2. I do not fully understand which type I need, unfilled or ghosted 
> background event file?

That is up to you. The unfilled file has the holes where point sources have
been removed. The other files use a technique to fill in the holes. If you
trust this technique, then use the ghosted files. You can email the people
responsible for the blank sky repository and they will be able to provide help.
You can find their email at:

http://www.star.le.ac.uk/~jac48/BG/UserRequest/blankskyform.html

An alternative could be that I produce this file that you cant because of a
lack of memory and put it in an ftp server for you to download.

Let me know if you have further problems.

Thanks,

Ignacio de la Calle
XMM-Newton SOC


Followup 1

Compose reply
Download message
Date: Wed, 22 Jun 2011 15:46:22 +0200 (CEST)
Subject: Re: problems with mos/pn-spectra (PR#48058)
From: donic@matf.bg.ac.rs
To: "Ignacio de la Calle" <xmmhelp@sciops.esa.int>
------=_20110622154622_73173
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Dear Ignacio,

Thank You very much.

Instead of mos-spectra I tried to do the analysis using the Blank Sky
files. Now, it gave rise to the new questions.

1. If I want to extract the source spectrum from one region in detector
coordinates what should I do?

I followed the:

http://xmm.esac.esa.int/sas/current/documentation/threads/MOS_spectrum_thread.shtml

I used the mos1S001-obj-image-det.fits (result of emchain and mos-filter)
but it resulted in error:

evselect table=mos1S001-obj-image-det.fits withspectrumset=yes
spectrumset=mos1S001reg1_spectrum.fits energycolumn=PI spectralbinsize=15
withspecranges=yes specchannelmin=0 specchannelmax=11999
expression='((DETX,DETY) IN circle(-4763.0539,-1641.908,801.03048))'

** evselect: error (invalidBlockAccess), The block with qualified name
/tmp/fileoBw6st:PRIMARY is an array and may not be accessed as a table.

Then I used mos1S001-clean.fits file (also the result I get from emchain
and mos-filter) and it worked. But I used the
circle(-4763.0539,-1641.908,801.03048)) from mos1S001-obj-image-det.fits.
Is it correct? If I use the mos1S001-clean.fit I do not have the option to
use DETXY.

evselect table=mos1S001-clean.fits withspectrumset=yes
spectrumset=mos1S001reg1_spectrum.fits energycolumn=PI spectralbinsize=15
withspecranges=yes specchannelmin=0 specchannelmax=11999
expression='((DETX,DETY) IN circle(-4763.0539,-1641.908,801.03048))'

Then I follow the:

http://xmm.esac.esa.int/sas/current/documentation/threads/EPIC_blank_fields.shtml

to extract background spectra from blank fields event lists. I used the
same region i DETXY.

evselect table=mos1_events.fits withspectrumset=yes
spectrumset=mos1S001reg1_background_spectrum.fits energycolumn=PI
spectralbinsize=15 withspecranges=yes specchannelmin=0
specchannelmax=11999 expression='((DETX,DETY) IN
circle(-4763.0539,-1641.908,801.03048))'

2. Also, I did not do the step 9 from:

http://xmm.esac.esa.int/sas/current/documentation/threads/EPIC_blank_fields.shtml

because I did not fully understand it (externally-created detector map).
Am I supposed to run:

evselect table='1717_0551060101_M1S00150IME.FIT:EVENTS'
destruct=false withfilteredset=true
withimageset=true imageset=detmap.ds xcolumn=DETX ycolumn=DETY
withxranges=true ximagemin=-1500 ximagemax=1500 withyranges=true
yimagemin=-1500 yimagemax=1500 imagebinning='imageSize'
ximagesize=20 yimagesize=20
writedss=true updateexposure=true

as it is in:

http://xmm.esac.esa.int/sas/current/doc/arfgen/node8.html

for the file 1717_0551060101_M1S00150IME.FIT that is placed in ODF dir of
the Observation ?

2. I don not understand how to use the results of cheese (that I run
earlier) in this case ? Which task will use the results of cheese ?

I am sending You the full log of what I have done in the attachment as
well as the result spectrum in xpec.

Thank You very much in advance,
Dusan
------=_20110622154622_73173
Content-Type: application/postscript; name="mos1reg1_spectrum.ps"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="mos1reg1_spectrum.ps"

JSFQUy1BZG9iZS0zLjAgRVBTRi0zLjAKJSVGb3I6IGRvbmljCiUlVGl0bGU6IFBHUExPVCBQb3N0
U2NyaXB0IHBsb3QKJSVDcmVhdG9yOiBQR1BMT1QKJSVDcmVhdGlvbkRhdGU6IDIyLUp1bi0yMDEx
IDE0OjMwCiUlQm91bmRpbmdCb3g6IChhdGVuZCkKJSVPcmllbnRhdGlvbjogTGFuZHNjYXBlCiUl
UGFnZXM6IChhdGVuZCkKJSVFbmRDb21tZW50cwolJUJlZ2luUHJvbG9nCi9ncyAvZ3NhdmUgbG9h
ZCBkZWYKL2dyIC9ncmVzdG9yZSAgbG9hZCBkZWYKL0wge21vdmV0byBybGluZXRvIGN1cnJlbnRw
b2ludCBzdHJva2UgbW92ZXRvfSBiaW5kIGRlZgovQyB7cmxpbmV0byBjdXJyZW50cG9pbnQgc3Ry
b2tlIG1vdmV0b30gYmluZCBkZWYKL0Qge21vdmV0byAwIDAgcmxpbmV0byBjdXJyZW50cG9pbnQg
c3Ryb2tlIG1vdmV0b30gYmluZCBkZWYKL1NMVyB7NSBtdWwgc2V0bGluZXdpZHRofSBiaW5kIGRl
ZgovU0NGIC9wb3AgbG9hZCBkZWYKL0JQIHtuZXdwYXRoIG1vdmV0b30gYmluZCBkZWYKL0xQIC9y
bGluZXRvIGxvYWQgZGVmCi9FUCB7cmxpbmV0byBjbG9zZXBhdGggZW9maWxsfSBiaW5kIGRlZgov
TUIge2dzYXZlIHRyYW5zbGF0ZSBNRkFDIGR1cCBzY2FsZSAxIHNldGxpbmV3aWR0aCAyIHNldGxp
bmVjYXAgMCBzZXRsaW5lam9pbiBuZXdwYXRofSBiaW5kIGRlZgovTUUgL2dyZXN0b3JlIGxvYWQg
ZGVmCi9DQyB7MCAzNjAgYXJjIHN0cm9rZX0gYmluZCBkZWYKL0ZDIHswIDM2MCBhcmMgZmlsbH0g
YmluZCBkZWYKJSBmb250IHN0dWZmCi9wZ3NjYWxlIDAuMDcyIGRlZgolIElTT0xBVElOIGVuY29k
aW5nIHdpdGggYnVpbHQgaW4gbGluZXNwYWNpbmcgZGVmaW5pdGlvbnMuCiUgZnJvbSB0aW55ZGlj
dCBieSBEYXZpZCBCeXJhbS1XaWdmaWVsZCwgaHR0cDovL3d3dy5jYXBlbGxhLmRlbW9uLmNvLnVr
CiUgZm9udHNpemUgZGVmYXVsdCBzZXR0aW5nLgovRlMJeyAvZnMgZXhjaCBkZWYgfSBkZWYJIDEy
IEZTCiUgbGluZXNwYWNpbmcgcmF0aW8gdG8gZm9udHNpemU6IDEuMyBpcyBteSBkZWZhdWx0Ci9M
UiB7L2xyIGV4Y2ggZGVmIH0gZGVmIDEuMyBMUgovTEcgeyAvbGcgZXhjaCBkZWYgfSBkZWYgICAx
MiBMRwolIGNhbGN1bGF0ZSBsaW5lc3BhY2luZyBmcm9tIGNob3NlbiBmb250c2l6ZQovRiB7IGV4
Y2ggZHVwIGxyIG11bCBMRyBkdXAgRlMgZXhjaCBmaW5kZm9udCBleGNoIHNjYWxlZm9udCBzZXRm
b250IH0gZGVmCi9JU09GT05UIHsgZmluZGZvbnQgZHVwIGxlbmd0aCBkaWN0IGJlZ2luIHsgMSBp
bmRleCAvRklEIG5lIHtkZWZ9IHtwb3AgcG9wfQppZmVsc2UgfSBmb3JhbGwgL0VuY29kaW5nIElT
T0xhdGluMUVuY29kaW5nIGRlZiBjdXJyZW50ZGljdCBlbmQgL3RtcGZ

Message of length 21416 truncated


Reply 2

Resend
From: Ignacio de la Calle <xmmhelp@sciops.esa.int>
To: donic@matf.bg.ac.rs
Subject: Re: problems with mos/pn-spectra (PR#48058)
Date: Mon Jun 27 10:32:53 2011
Dear Dusan,

Sorry for the late reply but I am away from ESAC.

> 1. If I want to extract the source spectrum from one region in detector
> coordinates what should I do?
> 
> I followed the:
> 
> http://xmm.esac.esa.int/sas/current/documentation/threads/MOS_spectrum_thread.shtml
> 
> I used the mos1S001-obj-image-det.fits (result of emchain and mos-filter)
> but it resulted in error:
> 
> evselect table=mos1S001-obj-image-det.fits withspectrumset=yes
> spectrumset=mos1S001reg1_spectrum.fits energycolumn=PI spectralbinsize=15
> withspecranges=yes specchannelmin=0 specchannelmax=11999
> expression='((DETX,DETY) IN circle(-4763.0539,-1641.908,801.03048))'
> 
> ** evselect: error (invalidBlockAccess), The block with qualified name
> /tmp/fileoBw6st:PRIMARY is an array and may not be accessed as a table.

I cant look at the files from here, but it does look as if mos1S001-obj-image-
det.fits is an image (by the name of the file). evselect takes event files,
like mos1S001-clean.fits.

> Then I used mos1S001-clean.fits file (also the result I get from emchain
> and mos-filter) and it worked. But I used the
> circle(-4763.0539,-1641.908,801.03048)) from mos1S001-obj-image-det.fits.
> Is it correct? If I use the mos1S001-clean.fit I do not have the option to
> use DETXY.
> 
> evselect table=mos1S001-clean.fits withspectrumset=yes
> spectrumset=mos1S001reg1_spectrum.fits energycolumn=PI spectralbinsize=15
> withspecranges=yes specchannelmin=0 specchannelmax=11999
> expression='((DETX,DETY) IN circle(-4763.0539,-1641.908,801.03048))'

I am not sure what problem you have here. The above command seems correct. You
use the image to define the extraction region, but then filter the event file
using that region.

> Then I follow the:
> 
> http://xmm.esac.esa.int/sas/current/documentation/threads/EPIC_blank_fields.shtml
> 
> to extract background spectra from blank fields event lists. I used the
> same region i DETXY.
> 
> evselect table=mos1_events.fits withspectrumset=yes
> spectrumset=mos1S001reg1_background_spectrum.fits energycolumn=PI
> spectralbinsize=15 withspecranges=yes specchannelmin=0
> specchannelmax=11999 expression='((DETX,DETY) IN
> circle(-4763.0539,-1641.908,801.03048))'
> 
> 2. Also, I did not do the step 9 from:
> 
> http://xmm.esac.esa.int/sas/current/documentation/threads/EPIC_blank_fields.shtml
> 
> because I did not fully understand it (externally-created detector map).
> Am I supposed to run:
> 
> evselect table='1717_0551060101_M1S00150IME.FIT:EVENTS'
> destruct=false withfilteredset=true
> withimageset=true imageset=detmap.ds xcolumn=DETX ycolumn=DETY
> withxranges=true ximagemin=-1500 ximagemax=1500 withyranges=true
> yimagemin=-1500 yimagemax=1500 imagebinning='imageSize'
> ximagesize=20 yimagesize=20
> writedss=true updateexposure=true
> 
> as it is in:
> 
> http://xmm.esac.esa.int/sas/current/doc/arfgen/node8.html
> 
> for the file 1717_0551060101_M1S00150IME.FIT that is placed in ODF dir of
> the Observation ?

Yes, this should be the event file that you have generated. For the case of
extended sources it would be good that you follow what it is said in the task
description
to generate the ARF,

http://xmm.esac.esa.int/sas/current/doc/arfgen/node8.html 

Have a look as well at the following section of the SAS Manual,

http://xmm.esac.esa.int/external/xmm_user_support/documentation/sas_usg/USG/node65.ht
ml

> 2. I don not understand how to use the results of cheese (that I run
> earlier) in this case ? Which task will use the results of cheese ?

This is what cheese outputs.  
http://xmm.esac.esa.int/sas/current/doc/cheese/node6.html

It produces region files, amongst other things, that you can use to filter the
event file and remove point sources. Have a look also at the task description
and
the ESAS Manual:

ftp://xmm.esac.esa.int/pub/xmm-esas/xmm-esas.pdf

> I am sending You the full log of what I have done in the attachment as
> well as the result spectrum in xpec.

I cant have a look at this from here, sorry. I will try and have a look
when I get back to Madrid.

Thanks,

Ignacio de la Calle
XMM-Newton SOC


Followup 2

Compose reply
Download message
Date: Mon, 4 Jul 2011 00:55:43 +0200 (CEST)
Subject: Re: problems with mos/pn-spectra (PR#48058)
From: donic@matf.bg.ac.rs
To: "Ignacio de la Calle" <xmmhelp@sciops.esa.int>
Dear Ignacio,

Thank You very much. I managed to get the reasonable mos/pn spectrum.

I just have three more short questions:

1. Regarding the specifying an external detector map for an extended source.

At the:

http://xmm.esac.esa.int/sas/current/doc/arfgen/node8.html

it is said that I have to use:

0001_0000010010_M1S00100IME.FIT

file to generate the detector map by evselect. But, there are 12/7 such
files in the ODF DIR for pn and mos (for every CCD).

It is also said that the "Such detector maps can be generated in xmmselect
given an event list that contains a column DETX, DETY, by selecting those
columns in the main GUI dialog of that task, clicking the 'Image' button
and then specifying the preferred image binning in the subsequent evselect
dialog".

On the other hand, after the pn-filter and mos-filter I have, for pn,
pnU002-obj-image-det.fits file (similar for the mos1/2).

Can I use the pnU002-obj-image-det.fits for pn_detmap.ds by just defining:

cp pnU002-obj-image-det.fits pn_detmap.ds

?

I tried doing this way and I got the pn spectrum that looks ok.


2. If I use the blank sky files, is it correctly done if I put:

badpixlocation=pn_blank_events_clean.fits

in the second backscale ?

(pn_blank_events_clean.fits is filtered Blank sky event list file that I
am using)

backscale spectrumset=pn_reg1_spectrum.fits
badpixlocation=pnU002-clean.fits

backscale spectrumset=pn_reg1_background_spectrum.fits
badpixlocation=pn_blank_events_clean.fits

I tried doing this way and I got the pn spectrum that looks ok.


3. I used the XSPEC for spectrum analysis. For pn there was no problem but
for the mos there was a warning after the execution of:

da 1 SpecGrp.ds

***Warning: Detected response matrix energy bin value = 0 (or neg).
     XSPEC will instead use small finite value (response file will not be
altered).

...

Can I ignore it? Is it important ? I also got the reasonable spectrum in
this case.

This is what I have done:

######################################################################  #
MOS1S001
# REGION 1
# mos1_reg1.txt: &&((DETX,DETY) IN circle(-5074.62,-2319.3,1104.7461))

# Spectrum extraction

evselect table=mos1S001-clean.fits withspectrumset=yes
spectrumset=mos1S001_reg1_spectrum.fits energycolumn=PI spectralbinsize=15
withspecranges=yes specchannelmin=0 specchannelmax=11999
expression='#XMMEA_EM && (PATTERN<=12) && ((DETX,DETY) IN
circle(-5074.62,-2319.3,1104.7461))' |& tee
mos1_reg1_spec_extraction_log.txt

fparkey '2009-04-24T11:18:46' mos1_blank_events.fits+0 DATE-OBS add=yes

fparkey '2009-04-24T11:18:46' mos1_blank_events.fits+1 DATE-OBS add=yes

# I filtered the Blank sky event list (unfilled)

evselect table=mos1_blank_events.fits withrateset=Y
rateset=ratemos1blank.fits
maketimecolumn=Y timebinsize=100 makeratecolumn=Y expression='#XMMEA_EM
&&
(PI>10000) && (PATTERN==0)'

tabgtigen table=ratemos1blank.fits expression='RATE<=0.35'
gtiset=mos1blankgti.fits

evselect table=mos1_blank_events.fits withfilteredset=Y
filteredset=mos1_blank_events_clean.fits destruct=Y keepfilteroutput=T
expression='#XMMEA_EM && gti(mos1blankgti.fits,TIME) &&
(PI>150)'

# Extraction of the background spectrum

evselect table=mos1_blank_events_clean.fits withspectrumset=yes
spectrumset=mos1S001_reg1_background_spectrum.fits energycolumn=PI
spectralbinsize=15 withspecranges=yes specchannelmin=0
specchannelmax=11999
expression='#XMMEA_EM && (PATTERN<=12) && ((DETX,DETY) IN
circle(-5074.62,-2319.3,1104.7461))' |& tee
mos1_reg1_background_extraction_log.txt

backscale spectrumset=mos1S001_reg1_spectrum.fits
badpixlocation=mos1S001-clean.fits

backscale spectrumset=mos1S001_reg1_background_spectrum.fits
badpixlocation=mos1_blank_events_clean.fits

cp mos1S001-obj-image-det.fits mos1_detmap.ds

rmfgen spectrumset=mos1S001_reg1_spectrum.fits rmfset=mos1_reg1.rmf
detmaptype=dataset detmaparray=mos1_detmap.ds

arfgen spectrumset=mos1S001_reg1_spectrum.fits arfset=mos1_reg1.arf
withrmfset=yes rmfset=mos1_reg1.rmf badpixlocation=mos1S001-clean.fits
extendedsource=yes detmaptype=dataset detmaparray=mos1_detmap.ds

specgroup spectrumset=mos1S001_reg1_spectrum.fits mincounts=25
oversample=3 rmfset=mos1_reg1.rmf arfset=mos1_reg1.arf
backgndset=mos1S001_reg1_background_spectrum.fits

# In new terminal I run XSPEC

da 1 SpecGrp.ds

***Warning: Detected response matrix energy bin value = 0 (or neg).
     XSPEC will instead use small finite value (response file will not be
altered).

1 spectrum  in use

Spectral Data File: SpecGrp.ds  Spectrum 1
Net count rate (cts/s) for Spectrum:1  1.572e-01 +/- 1.815e-03 (93.2 % total)
 Assigned to Data Group 1 and Plot Group 1
  Noticed Channels:  1-63
  Telescope: XMM Instrument: EMOS1  Channel Type: PI
  Exposure Time: 5.208e+04 sec
 Using Background File
mos1S001_reg1_background_spectrum.fits
  Background Exposure Time: 2.024e+05 sec
 Using Response (RMF) File            mos1_reg1.r

Message of length 5470 truncated


Reply 3

Resend
From: Ignacio de la Calle <xmmhelp@sciops.esa.int>
To: donic@matf.bg.ac.rs
Subject: Re: problems with mos/pn-spectra (PR#48058)
Date: Tue Jul 19 09:03:01 2011
Dear Donic,

Sorry I did not get back to you earlier, but I have been away. I will look
into your question and get back to you soon.

Thanks,

Ignacio de la Calle
XMM-Newton SOC


Reply 4

Resend
From: Ignacio de la Calle <xmmhelp@sciops.esa.int>
To: donic@matf.bg.ac.rs
Subject: Re: problems with mos/pn-spectra (PR#48058)
Date: Wed Jul 27 15:16:40 2011
Dear Dusan,

Sorry for the delay.

> 1. Regarding the specifying an external detector map for an extended
source.
> 
> At the:
> 
> http://xmm.esac.esa.int/sas/current/doc/arfgen/node8.html
> 
> it is said that I have to use:
> 
> 0001_0000010010_M1S00100IME.FIT
> 
> file to generate the detector map by evselect. But, there are 12/7 such
> files in the ODF DIR for pn and mos (for every CCD).

It should be the event file you get after emproc. IME refers to the imaging
mode event file. I think this is just an illustrative example.

> It is also said that the "Such detector maps can be generated in xmmselect
> given an event list that contains a column DETX, DETY, by selecting those
> columns in the main GUI dialog of that task, clicking the 'Image' button
> and then specifying the preferred image binning in the subsequent evselect
> dialog".
> 
> On the other hand, after the pn-filter and mos-filter I have, for pn,
> pnU002-obj-image-det.fits file (similar for the mos1/2).
> 
> Can I use the pnU002-obj-image-det.fits for pn_detmap.ds by just defining:
> 
> cp pnU002-obj-image-det.fits pn_detmap.ds
> 
> ?

Yes, it should be fine. However, the image should not have to large a number
of pixels, otherwise it will take a long time to compute. An image of 100 x 
100 pixels should do it. But if you are fine with a bigger one, its ok.

> I tried doing this way and I got the pn spectrum that looks ok.
> 
> 
> 2. If I use the blank sky files, is it correctly done if I put:
> 
> badpixlocation=pn_blank_events_clean.fits
> 
> in the second backscale ?
> 
> (pn_blank_events_clean.fits is filtered Blank sky event list file that I
> am using)
> 
> backscale spectrumset=pn_reg1_spectrum.fits
> badpixlocation=pnU002-clean.fits
> 
> backscale spectrumset=pn_reg1_background_spectrum.fits
> badpixlocation=pn_blank_events_clean.fits
> 
> I tried doing this way and I got the pn spectrum that looks ok.

This looks ok too. You need to use the event file that you use to create
the spectrum, and it looks like thats what you did.

 
> 3. I used the XSPEC for spectrum analysis. For pn there was no problem but
> for the mos there was a warning after the execution of:
> 
> da 1 SpecGrp.ds
> 
> ***Warning: Detected response matrix energy bin value = 0 (or neg).
>      XSPEC will instead use small finite value (response file will not be
> altered).
> 
> ...
> 
> Can I ignore it? Is it important ? I also got the reasonable spectrum in
> this case.

Yes, you can ignore this. It probably corresponds to the first bin.

> This is what I have done:
> 
> ######################################################################  #
> MOS1S001
> # REGION 1
> # mos1_reg1.txt: &&((DETX,DETY) IN
circle(-5074.62,-2319.3,1104.7461))
> 
> # Spectrum extraction
> 
> evselect table=mos1S001-clean.fits withspectrumset=yes
> spectrumset=mos1S001_reg1_spectrum.fits energycolumn=PI spectralbinsize=15
> withspecranges=yes specchannelmin=0 specchannelmax=11999
> expression='#XMMEA_EM && (PATTERN<=12) && ((DETX,DETY)
IN
> circle(-5074.62,-2319.3,1104.7461))' |& tee
> mos1_reg1_spec_extraction_log.txt
> 
> fparkey '2009-04-24T11:18:46' mos1_blank_events.fits+0 DATE-OBS add=yes
> 
> fparkey '2009-04-24T11:18:46' mos1_blank_events.fits+1 DATE-OBS add=yes
> 
> # I filtered the Blank sky event list (unfilled)
> 
> evselect table=mos1_blank_events.fits withrateset=Y
> rateset=ratemos1blank.fits
> maketimecolumn=Y timebinsize=100 makeratecolumn=Y expression='#XMMEA_EM
&&
> (PI>10000) && (PATTERN==0)'
> 
> tabgtigen table=ratemos1blank.fits expression='RATE<=0.35'
> gtiset=mos1blankgti.fits
> 
> evselect table=mos1_blank_events.fits withfilteredset=Y
> filteredset=mos1_blank_events_clean.fits destruct=Y keepfilteroutput=T
> expression='#XMMEA_EM && gti(mos1blankgti.fits,TIME) &&
(PI>150)'
> 
> # Extraction of the background spectrum
> 
> evselect table=mos1_blank_events_clean.fits withspectrumset=yes
> spectrumset=mos1S001_reg1_background_spectrum.fits energycolumn=PI
> spectralbinsize=15 withspecranges=yes specchannelmin=0
> specchannelmax=11999
> expression='#XMMEA_EM && (PATTERN<=12) && ((DETX,DETY)
IN
> circle(-5074.62,-2319.3,1104.7461))' |& tee
> mos1_reg1_background_extraction_log.txt
> 
> backscale spectrumset=mos1S001_reg1_spectrum.fits
> badpixlocation=mos1S001-clean.fits
> 
> backscale spectrumset=mos1S001_reg1_background_spectrum.fits
> badpixlocation=mos1_blank_events_clean.fits
> 
> cp mos1S001-obj-image-det.fits mos1_det

Message of length 7199 truncated


Followup 3

Compose reply
Download message
Date: Tue, 2 Aug 2011 13:10:48 +0200 (CEST)
Subject: Re: problems with mos/pn-spectra (PR#48058)
From: donic@matf.bg.ac.rs
To: "Ignacio de la Calle" <xmmhelp@sciops.esa.int>
Dear Ignacio,

Thank You very much for the help. I think I got the ok spectrum.


The mos-spectra and pn-spectra did not work on my laptop (Fujitsu Simens,
Esprimo Mobile Laptop (32 bit), Ubuntu 10.04 detecting 2.7 GB RAM) during
the Workshop (I also tried at home, from the beginning - the same error).

I also tried the mos-spectra and pn-spectra on the 32 bit desktop computer
(i686) with 4 GB of RAM. Ubuntu 10.04 can see only 3.3 GB RAM. It still
does not work (the same fitsio errors).

I am not sure, but maybe the mos/pn-spectra works ok on 64 bit computers
but not on 32 bits or something else.

Thank You very much for help and best regards,
Dusan

PS.

** evselect: error (FITSIO), FITS error 112: cannot write to readonly file
cannot open compressed file with WRITE access (mem_compress_open)
filtered.fits
failed to find or open the following file: (ffopen)
filtered.fits






Reply 5

Resend
From: Ignacio de la Calle <xmmhelp@sciops.esa.int>
To: donic@matf.bg.ac.rs
Subject: Re: problems with mos/pn-spectra (PR#48058)
Date: Tue Aug  2 12:23:46 2011
Dear Dusan,

The computer I used here while you where in the workshop was a 32 
bit machine. I am not sure why you are having problems. I will pass
this information to the SAS developers anyhow. Did you try setting
the SAS env variable SAS_MEMORY_MODEL = low ? That might help.

Thanks,

Ignacio de la Calle
XMM-Newton SOC

> Thank You very much for the help. I think I got the ok spectrum.
> 
> 
> The mos-spectra and pn-spectra did not work on my laptop (Fujitsu Simens,
> Esprimo Mobile Laptop (32 bit), Ubuntu 10.04 detecting 2.7 GB RAM) during
> the Workshop (I also tried at home, from the beginning - the same error).
> 
> I also tried the mos-spectra and pn-spectra on the 32 bit desktop computer
> (i686) with 4 GB of RAM. Ubuntu 10.04 can see only 3.3 GB RAM. It still
> does not work (the same fitsio errors).
> 
> I am not sure, but maybe the mos/pn-spectra works ok on 64 bit computers
> but not on 32 bits or something else.
> 
> Thank You very much for help and best regards,
> Dusan
> 
> PS.
> 
> ** evselect: error (FITSIO), FITS error 112: cannot write to readonly file
> cannot open compressed file with WRITE access (mem_compress_open)
> filtered.fits
> failed to find or open the following file: (ffopen)
> filtered.fits
> 
> 
> 
> 
> 

Up to top level
AO15   AO16   AO17   AO18   AO19   Backgrounds   Calibration   Conference   Data   Docs   EPICMOS   EPICpn   Feedback   Gallery   Misc   OM   Pending   PhD_Theses   Publications   RGS   RadMonitor   SAS_Hardware   SAS_WS   SASv16.0   SASv16.0_Installation   SASv16.1   SASv16.1_Installation   SASv17.0   SASv17.0_Installation   SASv18.0   SASv18.0_Installation   SciSim   Simulators_other   Suggestions   Trash   Visibility   XMM-bouncing   XMM-news   XRPS   XSA   esas   incoming  

Logged in as guest


Please make your (short) question the subject of your request!


Web interface using JitterBug ... back to the XMM home page