Point-Source Analysis¶
basis.py¶
- author
Ruyman Azzollini
Created on Thu Apr 20 18:56:40 2017
-
class
vison.point.basis.SpotBase(data, log=None, verbose=False)¶
display.py¶
gauss.py¶
Gaussian Model of Point-like Sources¶
Simple class to do Gaussian Fitting to a spot.
- requires
NumPy, astropy
Created on Thu Apr 20 16:42:47 2017
- author
Ruyman Azzollini
-
class
vison.point.gauss.Gaussmeter(data, log=None, verbose=False, **kwargs)¶ Provides methods to measure the shape of an object using a 2D Gaussian Model.
- Parameters
data (np.ndarray) – stamp to be analysed.
log (instance) – logger
kwargs (dict) – additional keyword arguments
Settings dictionary contains all parameter values needed.
-
fit_Gauss(verbose=False)¶
models.py¶
Models (Point-Like Sources)¶
Library module with models for processing of point-source imaging data.
- requires
NumPy
- author
Ruyman Azzollini
Created on Wed Apr 19 11:47:00 2017
-
vison.point.models.fgauss2D(x, y, p)¶ - A gaussian fitting function where
p[0] = amplitude p[1] = x0 p[2] = y0 p[3] = sigmax p[4] = sigmay p[5] = floor
photom.py¶
Aperture Photometry of point-like objects¶
Simple class to do aperture photometry on a stamp of a point-source.
- requires
NumPy
Created on Thu Apr 20 14:37:46 2017
- author
Ruyman Azzollini
-
class
vison.point.photom.Photometer(data, log=None, verbose=False, **kwargs)¶ Provides methods to measure the shape of an object.
- Parameters
data (np.ndarray) – stamp to be analysed.
log (instance) – logger
kwargs (dict) – additional keyword arguments
Settings dictionary contains all parameter values needed.
-
doap_photom(centre, rap, rin=- 1.0, rout=- 1.0, gain=3.5, doErrors=True, subbgd=False)¶
-
get_centroid(rap=None, full=False)¶ - TODO:
add aperture masking
-
measure_bgd(rin, rout)¶
-
sub_bgd(rin, rout)¶
shape.py¶
Quadrupole Moments Shape Measurement¶
Simple class to measure quadrupole moments and ellipticity of an object.
- requires
NumPy, PyFITS
- author
Sami-Matias Niemi, Ruyman Azzollini
-
class
vison.point.shape.Shapemeter(data, log=None, verbose=False, **kwargs)¶ Provides methods to measure the shape of an object.
- Parameters
data (np.ndarray) – stamp to be analysed.
log (instance) – logger
kwargs (dict) – additional keyword arguments
Settings dictionary contains all parameter values needed.
-
circular2DGaussian(x, y, sigma)¶ Create a circular symmetric Gaussian centered on x, y.
- Parameters
x (float) – x coordinate of the centre
y (float) – y coordinate of the centre
sigma (float) – standard deviation of the Gaussian, note that sigma_x = sigma_y = sigma
- Returns
circular Gaussian 2D profile and x and y mesh grid
- Return type
dict
-
ellip2DGaussian(x, y, sigmax, sigmay)¶ Create a two-dimensional Gaussian centered on x, y.
- Parameters
x (float) – x coordinate of the centre
y (float) – y coordinate of the centre
sigmax (float) – standard deviation of the Gaussian in x-direction
sigmay (float) – standard deviation of the Gaussian in y-direction
- Returns
circular Gaussian 2D profile and x and y mesh grid
- Return type
dict
-
measureRefinedEllipticity()¶ Derive a refined iterated polarisability/ellipticity measurement for a given object.
By default polarisability/ellipticity is defined in terms of the Gaussian weighted quadrupole moments. If self.shsettings[‘weighted’] is False then no weighting scheme is used.
The number of iterations is defined in self.shsettings[‘iterations’].
- Returns
centroids [indexing stars from 1], ellipticity (including projected e1 and e2), and R2
- Return type
dict
-
quadrupoles(image)¶ Derive quadrupole moments and ellipticity from the input image.
- Parameters
img (ndarray) – input image data
- Returns
quadrupoles, centroid, and ellipticity (also the projected components e1, e2)
- Return type
dict
-
writeFITS(data, output)¶ Write out a FITS file using PyFITS.
- Parameters
data (ndarray) – data to write to a FITS file
output (string) – name of the output file
- Returns
None
spot.py¶
Spot Stamp Class.
Created on Thu Apr 20 15:35:08 2017
- author
Ruyman Azzollini
-
class
vison.point.spot.Spot(data, log=None, verbose=False, lowerleft=None, **kwargs)¶ Provides methods to do point-source analysis on a stamp. Aimed at basic analysis:
Photometry
Quadrupole Moments
Gaussian Fit
- Parameters
data (np.ndarray) – stamp to be analysed.
log (instance) – logger
kwargs (dict) – additional keyword arguments
Settings dictionary contains all parameter values needed.
-
get_photom()¶ measurements:’apflu’,’eapflu’,’bgd’,’ebgd’
-
get_shape_Gauss()¶ - Returns
res = dict(i0,ei0,x,ex,y,ey, sigma_x,esigma_x,sigmay,esigma_y, fwhm_x,efwhm_x, fwhm_y,efwhm_y, fluence,efluence)
-
get_shape_Moments()¶ - Returns
res = dict(x,y,ellip,e1,e2,a,b)
-
get_shape_easy(method='G', debug=False)¶
-
measure_basic(rap=10, rin=15, rout=- 1, gain=3.1, debug=False)¶ # TODO: # get basic statistics, measure and subtract background # update centroid # do aperture photometry # pack-up results and return
- Parameters
rap – source extraction aperture radius.
rin – inner radius of background annulus.
rout – outer radius of background annulus (-1 to set bound by image area).
gain – image gain (e-/ADU).
lib.py¶
Library module with useful data and functions for processing of point-source imaging data.
Created on Wed Apr 5 10:21:05 2017
- author
Ruyman Azzollini (except where indicated)
-
vison.point.lib.extract_spot(ccdobj, coo, Quad, log=None, stampw=25)¶
-
vison.point.lib.gen_point_mask(Quad, width=75, sources='all', coodict={'CCD1': {'E': {'ALPHA': 460.6, 3754.8, 'BRAVO': 1689.4, 3754.8, 'CHARLIE': 1075.0, 3129.0, 'DELTA': 460.6, 2503.2, 'ECHO': 1689.4, 2503.2}, 'F': {'ALPHA': 2579.6, 3754.8, 'BRAVO': 3808.4, 3754.8, 'CHARLIE': 3194.0, 3129.0, 'DELTA': 2579.6, 2503.2, 'ECHO': 3808.4, 2503.2}, 'G': {'ALPHA': 2579.6, 1668.8000000000002, 'BRAVO': 3808.4, 1668.8000000000002, 'CHARLIE': 3194.0, 1043.0, 'DELTA': 2579.6, 417.20000000000005, 'ECHO': 3808.4, 417.20000000000005}, 'H': {'ALPHA': 460.6, 1668.8000000000002, 'BRAVO': 1689.4, 1668.8000000000002, 'CHARLIE': 1075.0, 1043.0, 'DELTA': 460.6, 417.20000000000005, 'ECHO': 1689.4, 417.20000000000005}}, 'CCD2': {'E': {'ALPHA': 542.0, 1725.0, 'BRAVO': 1716.0, 1700.0, 'CHARLIE': 1126.0, 1124.0, 'DELTA': 521.0, 551.0, 'ECHO': 1695.0, 537.0}, 'F': {'ALPHA': 578.0, 1686.0, 'BRAVO': 1745.0, 1668.0, 'CHARLIE': 1141.0, 1144.0, 'DELTA': 553.0, 522.0, 'ECHO': 1723.0, 496.0}, 'G': {'ALPHA': 534.0, 1590.0, 'BRAVO': 1702.0, 1571.0, 'CHARLIE': 1139.0, 1033.0, 'DELTA': 515.0, 415.0, 'ECHO': 1685.0, 394.0}, 'H': {'ALPHA': 554.0, 1626.0, 'BRAVO': 1725.0, 1606.0, 'CHARLIE': 1131.0, 1029.0, 'DELTA': 531.0, 446.0, 'ECHO': 1706.0, 435.0}}, 'CCD3': {'E': {'ALPHA': 460.6, 3754.8, 'BRAVO': 1689.4, 3754.8, 'CHARLIE': 1075.0, 3129.0, 'DELTA': 460.6, 2503.2, 'ECHO': 1689.4, 2503.2}, 'F': {'ALPHA': 2579.6, 3754.8, 'BRAVO': 3808.4, 3754.8, 'CHARLIE': 3194.0, 3129.0, 'DELTA': 2579.6, 2503.2, 'ECHO': 3808.4, 2503.2}, 'G': {'ALPHA': 2579.6, 1668.8000000000002, 'BRAVO': 3808.4, 1668.8000000000002, 'CHARLIE': 3194.0, 1043.0, 'DELTA': 2579.6, 417.20000000000005, 'ECHO': 3808.4, 417.20000000000005}, 'H': {'ALPHA': 460.6, 1668.8000000000002, 'BRAVO': 1689.4, 1668.8000000000002, 'CHARLIE': 1075.0, 1043.0, 'DELTA': 460.6, 417.20000000000005, 'ECHO': 1689.4, 417.20000000000005}}, 'names': ['ALPHA', 'BRAVO', 'CHARLIE', 'DELTA', 'ECHO']})¶