dimage.fake.models package

Model creation tools.

dimage.fake.models.listpath(take, modelname)[source]

Returns the path to a model list

Parameters:

take : str

“take” to be implemented

modelname : str

Name of model

Returns:

path : str

Path to model

Notes

Path is:
$FAKEPHOTOMETRY/[take]/model-list-[modelname].fits
dimage.fake.models.listrec(indx, flux, nx, ny, xcen, ycen, arcperpix)[source]

Creates recarray associated with a list.

Parameters:

indx : int

index number in model

flux : float

flux in model

nx, ny : int

size of model image (pixels)

xcen, ycen : float

center for model image (pixels)

arcperpix : float

arcsec per pixel for each image

Returns:

data : ndarray

ndarray with above quantities so named

dimage.fake.models.parpath(take, modelname)[source]

Returns the path to a model parameter list

Parameters:

take : str

“take” to be implemented

modelname : str

Name of model

Returns:

path : str

path to parameter list

Notes

Path is of the form:
$FAKEPHOTOMETRY/[take]/model-params-[modelname].fits
dimage.fake.models.readlist(take, modelname)[source]

Reads in Sersic 1D model list

Parameters:

take : str

“take” to be implemented

modelname : str

Name of model

Returns:

list : ndarray

recarray containing list of image properties

Notes

Inputs from:
$FAKEPHOTOMETRY/[take]/models/[modelname]/model-list-[modelname].fits
dimage.fake.models.readpar(take, modelname)[source]

Reads in Sersic 1D model parameter list

Parameters:

take : str

“take” to be implemented

modelname : str

Name of model

Returns:

params : ndarray

ndarray containing list

Notes

Inputs from:
$FAKEPHOTOMETRY/[take]/models/[modelname]/model-list-[modelname].fits
dimage.fake.models.rlimit(n, frac=0.99)[source]
dimage.fake.models.writelist(take, modelname, rflux, r50, n, phi, ba, arcperpix)[source]

Writes out Sersic 1D model list

Parameters:

take : str

“take” to be implemented

modelname : str

Name of model

rflux : np.float32

ndarray of fluxes

r50 : np.float32

ndarray of half-light radii

n : np.float32

ndarray of Sersic indices

phi : np.float32

ndarray of position angles

ba : np.float32

ndarray of minor-to-major (b/a) axis ratios

arcperpix: np.float32

ndarray of arcsec per pixel (default is 0.2)

Notes

Outputs into dir
$FAKEPHOTOMETRY/[take]/models/[modelname]
the two files
model-list-[modelname].fits model-params-[modelname].fits

Creates the directory if not already present (not including $FAKEPHOTOMETRY)