The functions in this module support the various aspects of tweakreg, including finding the objects in the images and plotting the residuals.
Return a grid of positions starting at X,Y given by ‘start’, and ending at X,Y given by ‘end’. The grid will be completely filled in X and Y by every ‘step’ interval.
Create a matrix which contains the delta between each XY position and each UV position.
Generate a WCS header object that can be used to populate a reference WCS HDU.
For most applications, stwcs.wcsutil.HSTWCS.wcs2header() will work just as well.
Find the center of the peak of offsets
Compute 1-D value of gaussian at position x relative to center.
Computes the 2D Gaussian with size nx*ny.
Parameters : | |
---|---|
nx : int ny : int [Default: None]
fwhm : float [Default: 1.0]
sigma_x : float [Default: None] sigma_y : float [Default: None]
zero_norm : bool [Default: False]
|
|
Returns : | |
gauss_arr : array
|
Return True if all characters are part of a floating point value
Convert a XYXYMATCH file into a vector plot or set of residuals plots.
This function provides a single interface for generating either a vector plot of residuals or a set of 4 plots showing residuals. The data being plotted can also be adjusted for a linear fit on-the-fly.
Parameters : | |
---|---|
coordfile : string
columns : list [Default: [0,1,2,3]]
data : list of arrays
title : string
axes : list
every : int [Default: 1]
limit : float
xlower : float ylower : float
output : string
headl : int [Default: 4]
headw : int [Default: 3]
xsh : float ysh : float
scale : float
fit : array
vector : bool [Default: True]
textscale : int [Default: 5]
append : bool [Default: False]
linfit : bool [Default: False]
rms : bool [Default: True]
|
Source finding algorithm based on NDIMAGE routines
This function provides a simple replacement for the DAOFIND task.
Parameters : | |
---|---|
array : arr
hmin : float
fwhm : float
minpix : int
sharplim : tuple
roundlim : tuple
datamax : float
|
|
Returns : | |
x : arr
y : arr
flux : arr
id : arr
|
Return the list of catalog filenames specified as part of the input @-file
Common function to interpret input column names provided by the user.
This function translates column specification provided by the user into a column number.
Parameters : | |
---|---|
colname : :
|
|
Returns : | |
cols : list
|
Notes
This function will understand the following inputs:
'1,2,3' or 'c1,c2,c3' or ['c1','c2','c3']
'1-3' or 'c1-c3'
'1:3' or 'c1:c3'
'1 2 3' or 'c1 c2 c3'
'1' or 'c1'
1
Read in exclusion definitions from file named by ‘exclusions’ and return a list of positions and distances
Function to parse RA and Dec input values and turn them into decimal degrees
Plot 2d histogram.
Function to convert HMS values into decimal degrees.
This function relies on the astrolib.coords package to perform the conversion to decimal degrees.
Parameters : | |
---|---|
ra : list or array
dec : list or array
|
|
Returns : | |
pos : arr
|
See also
astrolib.coords
Notes
Formats of ra and dec inputs supported:
["nn","nn","nn.nn"]
"nn nn nn.nnn"
"nn:nn:nn.nn"
"nnH nnM nn.nnS" or "nnD nnM nn.nnS"
Interpret input ASCII file to return arrays for specified columns.
Returns : | |
---|---|
outarr : list of arrays
|
Notes
The specification of the columns should be expected to have lists for each ‘column’, with all columns in each list combined into a single entry. For example:
cols = ['1,2,3','4,5,6',7]
where ‘1,2,3’ represent the X/RA values, ‘4,5,6’ represent the Y/Dec values and 7 represents the flux value for a total of 3 requested columns of data to be returned.
Read columns from FITS table
Function which reads specified columns from either FITS tables or ASCII files
This function reads in the columns specified by the user into numpy arrays regardless of the format of the input table (ASCII or FITS table).
Parameters : | |
---|---|
infile : string
cols : string or list of strings
|
|
Returns : | |
outarr : array
|
Write out a shiftfile for a given list of input Image class objects