Documentation
¶
Overview ¶
Package psf is forced photometry: the light of stars at places already known, fitted in small tiles of an image together with the background. Each star's light falls on the pixels as its effective point-spread function says, the share of a star's light each pixel records.
A Shape is that function, sampled finer than the pixels, as SPHEREx and Hubble publish theirs. A Tile is a few pixels about the stars, with each pixel's variance. Fit solves a batch of tiles, each apart, for each star's light and the background under them.
The places are held, not fitted, so each tile is one weighted linear least-squares solve. Every star near enough to give light to a tile belongs in it; a star left out lends its light to the others.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fitted ¶
type Fitted struct {
Fluxes, Errors []float64
Background, BackgroundError float64
Used int
ChiSquared float64
Err error
}
Fitted is what a tile's fit found: each star's light, in the pixels' unit summed over every pixel, and its error; the background, a pixel's worth, and its error; how many pixels the fit used, and its chi-squared over them.
Err is why a tile was refused, and the rest is then empty.
type Shape ¶
type Shape struct {
// contains filtered or unexported fields
}
Shape is an effective point-spread function: the share of a star's light a pixel records, by where the pixel's centre lies from the star, sampled over times finer than the pixels each way.
func ShapeOf ¶
ShapeOf is a shape from its samples: side by side of them, x varying fastest, then y, over samples to a pixel each way, the star at the middle sample. The samples are scaled to sum to one, so a star's light is whole however the publisher normalised them.
It refuses an even side, which has no middle sample, and a side of under three, which cannot be interpolated. It refuses an oversampling below one, samples that do not fill the side, a sample that is not a number, and samples that sum to none or less.
A sample below none is kept: a measured shape may dip there in its wings.
func (*Shape) Reach ¶
Reach is how far from the star, in pixels along either axis, the shape gives any pixel light: past it every share is none.
type Star ¶
Star is a star at a place known before the fit, and its shape there. The place is in the tile's pixels: the first pixel's centre is at x 0, y 0, x counting across a row and y up the rows.
type Tile ¶
type Tile struct {
Width, Height int
Pixels []float64
Variance []float64
Ignored []bool
Stars []Star
}
Tile is a few pixels of an image about some stars: each pixel's value and its variance, row by row from y 0 with x varying fastest, and the pixels the fit leaves out. Ignored may be nil, leaving none out.