ExtractionChain¶
-
class
xpolbeamline.events.
ExtractionChain
[source]¶ Bases:
object
Event extraction chain with good default settings
Parameters: fitsimage : sting
Path to fits image file
Returns: events :
astropy.table.Table
Event table
Attributes Summary
process_steps
Methods Summary
__call__
(fitsimage)add_header
(evt, hdr)Add all keywords in header to meta info of evt table. add_islands
(evt, image)Extract 5x5 and 3x3 event islands from image at FRAME, X, Y pos in evt
bkg_remover
(image)Remove median for each column from image correct_xy_roi
(evt)Add offset to X,Y coordinates based on ROI descr
(obj)Return class or function name evt_identify
(image[, sigma_clip_level, …])Find the events of the given image. Attributes Documentation
-
process_steps
= OrderedDict([('ENERGY', <function energy_from_island>), ('GRADE', <function acis_grade>), ('ASCA', <function asca_grade>), ('HOTPIX', <function hotpixelbyoccurence>), ('ONEDGE', <function ExtractionChain.<lambda>>), ('d2nextevt', <function dist2nextevent>), ('CONFUSED', <function ExtractionChain.<lambda>>), ('energy_good', <function ExtractionChain.<lambda>>), ('GOOD', <function ExtractionChain.<lambda>>)])¶
Methods Documentation
-
add_header
(evt, hdr)[source]¶ Add all keywords in header to meta info of evt table.
This function also adds a few keywords of its own.
Parameters: evt :
astropy.table.Table
Event table
hdr :
astropy.io.fits.Header
Fits header
-
static
add_islands
(evt, image)¶ Extract 5x5 and 3x3 event islands from image at FRAME, X, Y pos in
evt
Parameters: evt :
astropy.table.Table
Event table
image : np.array of shape (frame, x, y)
3d background subtracted image
-
static
bkg_remover
(image)¶ Remove median for each column from image
Parameters: image : np.array of shape (frame, x, y)
original image
Returns: bkgremoved : np.array of same shape as
image
Copy of image with background removed
-
static
descr
(obj)[source]¶ Return class or function name
Parameters: obj : object
Returns: name : string
name of class (for objects or classes) or function
-
static
evt_identify
(image, sigma_clip_level=5, peak_size=3)¶ Find the events of the given image.
This function identifies local maxima, using some cuts.
Parameters: image : np.array of shape (frame, x, y)
background subtracted image
sigma_clip_level : float
Level for sigma clipping
peak_size : int
Event are recognized, if they are highest pixel in an island of size (peacksize * peak_size).
Returns: events :
astropy.table.Table
Event table
-