@@ -311,23 +311,14 @@ def get_epic_spectra(self, filename, source_number, *,
311
311
instrument = [], path = "" , verbose = False ):
312
312
"""Extracts in path (when set) the EPIC sources spectral products from a
313
313
given TAR file.
314
- For a given TAR file obtained with:
315
- XMM.download_data(OBS_ID,level="PPS",extension="FTZ",filename=tarfile)
314
+
316
315
This function extracts the EPIC sources spectral products in a given
317
316
instrument (or instruments) from it
318
317
The result is a dictionary containing the paths to the extracted EPIC
319
318
sources spectral products with key being the instrument
320
319
If the instrument is not specified this function will
321
320
return all the available instruments
322
321
323
- Examples:
324
- Extracting all bands and instruments:
325
- result = XMM.get_epic_spectra(tarfile,83,
326
- instrument=['M1','M2','PN'])
327
- If we want to retrieve the source spectrum of the instrument PN
328
- fits_image = result['PN']
329
- fits_image will be the full path to the extracted FTZ file
330
-
331
322
Parameters
332
323
----------
333
324
filename : string, mandatory
@@ -354,6 +345,18 @@ def get_epic_spectra(self, filename, source_number, *,
354
345
The structure and the content of the extracted compressed FITS files
355
346
are described in details in the Pipeline Products Description
356
347
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
348
+
349
+ Examples
350
+ --------
351
+ Extracting all bands and instruments:
352
+
353
+ >>> result = XMM.get_epic_spectra(tarfile,83, instrument=['M1','M2','PN'])
354
+
355
+ To retrieve the source spectrum of the instrument PN.
356
+ (The full path of the extracted FTZ file is returned.)
357
+
358
+ >>> fits_image = result['PN']
359
+
357
360
"""
358
361
_instrument = ["M1" , "M2" , "PN" , "EP" ]
359
362
_product_type = ["SRSPEC" , "BGSPEC" , "SRCARF" ]
@@ -445,9 +448,6 @@ def get_epic_images(self, filename, band=[], instrument=[],
445
448
446
449
"""Extracts the EPIC images from a given TAR file
447
450
448
- For a given TAR file obtained with:
449
- XMM.download_data(OBS_ID,level="PPS",extension="FTZ",filename=tarfile)
450
-
451
451
This function extracts the EPIC images in a given band (or bands) and
452
452
instrument (or instruments) from it
453
453
@@ -461,30 +461,6 @@ def get_epic_images(self, filename, band=[], instrument=[],
461
461
If so, this function will also extract the exposure maps and detector
462
462
masks within the specified bands and instruments
463
463
464
- Examples
465
- --------
466
-
467
- Extract all bands and instruments::
468
- result = XMM.get_epic_images(tarfile,band=[1,2,3,4,5,8],
469
- instrument=['M1','M2','PN'],**kwargs)
470
-
471
- If we want to retrieve the band 3 for the instrument PN (p-n junction)::
472
- fits_image = result[3]['PN']
473
-
474
- ``fits_image`` will be the full path to the extracted FTZ file
475
-
476
- Extract the exposure and detector maps::
477
- result = XMM.get_epic_images(tarfile,band=[1,2,3,4,5,8],
478
- instrument=['M1','M2','PN'],
479
- get_detmask=True,
480
- get_exposure_map=True)
481
-
482
- If we want to retrieve exposure map in the band 3 for the instrument PN::
483
- fits_image = result[3]['PN_expo']
484
-
485
- For retrieving the detector mask in the band 3 for the instrument PN::
486
- fits_image = result[3]['PN_det']
487
-
488
464
Parameters
489
465
----------
490
466
filename : string, mandatory
@@ -511,6 +487,33 @@ def get_epic_images(self, filename, band=[], instrument=[],
511
487
The structure and the content of the extracted compressed FITS files
512
488
are described in details in the Pipeline Products Description
513
489
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
490
+
491
+ Examples
492
+ --------
493
+
494
+ Extract all bands and instruments:
495
+
496
+ >>> result = XMM.get_epic_images(tarfile, band=[1,2,3,4,5,8], instrument=['M1','M2','PN'])
497
+
498
+ To retrieve the band 3 for the instrument PN (p-n junction):
499
+
500
+ >>> fits_image = result[3]['PN']
501
+
502
+ Extract the exposure and detector maps:
503
+
504
+ >>> result = XMM.get_epic_images(tarfile, band=[1, 2, 3, 4, 5, 8],
505
+ instrument=['M1', 'M2', 'PN'],
506
+ get_detmask=True,
507
+ get_exposure_map=True)
508
+
509
+ To retrieve exposure map in the band 3 for the instrument PN:
510
+
511
+ >>> fits_image = result[3]['PN_expo']
512
+
513
+ To retrieve the detector mask in the band 3 for the instrument PN:
514
+
515
+ >>> fits_image = result[3]['PN_det']
516
+
514
517
"""
515
518
516
519
_product_type = ["IMAGE_" ]
@@ -673,17 +676,6 @@ def get_epic_lightcurve(self, filename, source_number, *,
673
676
If the instrument is not specified, this function will
674
677
return all available instruments
675
678
676
- Examples:
677
-
678
- Extracting all instruments:
679
- result = XMM.get_epic_lightcurve(tarfile,146,
680
- instrument=['M1','M2','PN'])
681
-
682
- If we want to retrieve the light curve of the instrument PN
683
- fits_image = result['PN']
684
-
685
- fits_image will be the full path to the extracted FTZ file
686
-
687
679
Parameters
688
680
----------
689
681
filename : string, mandatory
@@ -708,6 +700,18 @@ def get_epic_lightcurve(self, filename, source_number, *,
708
700
The structure and the content of the extracted compressed FITS files
709
701
are described in details in the Pipeline Products Description
710
702
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
703
+
704
+ Examples
705
+ --------
706
+
707
+ Extracting all instruments:
708
+
709
+ >>> result = XMM.get_epic_lightcurve(tarfile, 146, instrument=['M1','M2', 'PN'])
710
+
711
+ To retrieve the light curve of the instrument PN:
712
+
713
+ >>> fits_image = result['PN']
714
+
711
715
"""
712
716
_instrumnet = ["M1" , "M2" , "PN" , "EP" ]
713
717
_band = [8 ]
0 commit comments