clusex.lib package¶
Submodules¶
clusex.lib.cgpng module¶
clusex.lib.check module¶
- clusex.lib.check.CheckFlag(val, check)[source]¶
Check for flag contained in $val, returns 1 if found
- clusex.lib.check.CheckKron(xpos, ypos, x, y, R, theta, q)[source]¶
check if position is inside of the Kron Ellipse saturaded region returns True if object center is in Ellipse region
clusex.lib.classify_galaxies module¶
clusex.lib.ds9 module¶
clusex.lib.galaxypng module¶
Created on Mon Apr 28 16:13:00 2025
@author: samnay
clusex.lib.getdesi module¶
- class clusex.lib.getdesi.DownImage(ra, dec, scale=0.3515625, width=512, height=512, savename=None, sdss=False)[source]¶
Bases:
objectClass for an DESI/SDSS png image.
RA, DEC - J2000, degrees SCALE - plate scale in arsec per pixel WIDTH, HEIGHT - size of image in pixels SAVENAME - if none provided, defaults to ‘object.jpg’ DR - integer value for SDSS data release.
clusex.lib.init module¶
- class clusex.lib.init.Params[source]¶
Bases:
object- SexArSort = 'sortar.cat'¶
- at1 = 1¶
- at2 = 1¶
- bf1 = 1¶
- bf2 = 1¶
- bs1 = 1¶
- bs2 = 1¶
- create = 0¶
- da1 = 1¶
- da2 = 1¶
- dm1 = 1¶
- dm2 = 1¶
- dn1 = 1¶
- dn2 = 1¶
- dt1 = 1¶
- dt2 = 1¶
- flagDs9 = 1¶
- flagminrad = False¶
- gain = 10¶
- image = 'none.fits'¶
- joinscale = 0.7¶
- minrad = 10¶
- minsatsize = 10¶
- offset = 0¶
- outcold = 'cold.sex'¶
- outhot = 'hot.sex'¶
- output = 'hc.cat'¶
- output2 = 'hotcold.cat'¶
- plate = 1¶
- red = 0.3¶
- regoutfile = 'hotcold.reg'¶
- run1 = 1¶
- run2 = 1¶
- satfileout = 'sat.reg'¶
- satlevel = 100000¶
- satmethod = 3¶
- satoffset = 1¶
- satq = 0.1¶
- satscale = 1¶
- scale = 1¶
- scalecor = 1¶
- seeing = 2¶
- sexfile = 'default.sex'¶
- tol = 0.5¶
- zpt = 25¶
clusex.lib.join module¶
clusex.lib.joinfiles module¶
clusex.lib.make module¶
- clusex.lib.make.GetPng(data, counts, wcs, dpi=200, cmap='gray_r', namepng='obj.png', bri=33, con=0.98)[source]¶
Converts image into a PNG image with axis coordinates, inverted colormap, log/zmax style
- clusex.lib.make.MakeKron(imagemat, idn, x, y, R, theta, ell, xmin, xmax, ymin, ymax)[source]¶
This subroutine create a Kron ellipse within a box defined by: xmin, xmax, ymin, ymax
- clusex.lib.make.MakeMask(maskimage, catfile, scale, offset, regfile)[source]¶
Create a mask image using ellipses for every Object of catfile. Now includes offset
- clusex.lib.make.MakeSatBox(maskimage, region, val, ncol, nrow)[source]¶
Create a mask for saturated regions
clusex.lib.maskellipse module¶
clusex.lib.radcor module¶
clusex.lib.read module¶
clusex.lib.satbox module¶
- class clusex.lib.satbox.SatBox(params: object)[source]¶
Bases:
object- CheckSatReg2(x, y, filein)[source]¶
Check if object is inside of saturated region. returns True if at least one pixel is inside
- Ds9SatBox(image, satfileout, sexcat, satscale, satoffset, satlevel, minsatsize, method, satq=0.5)[source]¶
Creates a file for ds9 which selects bad saturated regions
- GetMaxCor(image, xmin, xmax, ymin, ymax)[source]¶
Get coordinate (x,y) where the max value in counts
- GetMaxCor2(image, xmin, xmax, ymin, ymax)[source]¶
Get coordinate (x,y) where the max value in counts. Avoids negative pixels
clusex.lib.sky module¶
- class clusex.lib.sky.SkyCal[source]¶
Bases:
objectThis class compute the sky using two methods: random boxes and sky gradient
- GetEllipSky(ImageFile, MaskFile, xx, yy, thetadeg, q, Rinit, width, namering, ringmask, outliers=False)[source]¶
Gradient sky method
- GetSize(x, y, R, theta, q, ncol, nrow)[source]¶
this subroutine get the maximun and minimim pixels for Kron and sky ellipse
- MakeCoord(xmino, xmaxo, ymino, ymaxo, xmaxf, ymaxf)[source]¶
creates (x,y) coordinates between the inner and outer box