# Processing File

Description of the FITS structure file used to store of processing of instrumental data ("proc" format). Proc-files are the essential core of data formats in Munipack. Processing actions keeps their results in the extensions of this kind of file. All other actions uses proc-file as input.

Proc-file is not created by only one action, but the extensions are created by various ones. Objects detection and aperture photometry is provided by `munipack find, munipack aphot` modules. The astrometry calibration is determined by `munipack astrometry`. The photometry calibration is determined by `munipack phcal`.

Proc-file specification has been developed for internal use in Munipack and follows rules introduced by original DAOPHOT. Any backward compatibility is not guarantied.

# File Structure

The primary data array is followed by FIND, APERPHOT and GROWCURVE extensions. The order of the extensions can vary (use the name rather then index to access required extension).

FITS file structure including photometry
HDU | EXTNAME | Description | Action
--- | --- | --- | ---
0 |  | Primary array (frame) |
1 | FIND | Table of detected objects | find
2 | APERPHOT | Aperture Photometry table | aphot
3 | GROWCURVE | Growth curve table | aphot

## Primary Array

Data in primary array is untouched during objects detection (find) and aperture photometry phase. GAIN, READNS and SATURATE keywords may by modified on user request.

# Object Detection Table: FIND

The table contains detected objects.

Keywords
Keyword | Description | Units
--- | --- | ---
EXTNAME | FIND as the identifier of this table |
FWHM | typical full width at half of maximum for a detected object | pixels
THRESH | threshold for detection of peak of stars in sigmas of sky above sky mean level in a region |
LOBAD | Lower good datum | ADU
HIBAD | Higher good datum | ADU
RNDLO | Round low |
RNDHI | Round high |
SHRPLO | Sharp low |
SHRPHI | Sharp high |

## Header Comments

Header contains additional information in more human-readable format.

    Star detection parameters:
     Gain (e-/ADU)=   [..]      (see primary HDU)
     Saturation (ADU)=  [..]      (see primary HDU)
     Read noise (ADU)=   [..]      (see primary HDU)
     Lower threshold (sigma)=   [..]
     Levels range (ADU) =   [..]     ..   [..]
     Round range =  -1.00000000     ..   1.00000000
     Sharp range =  0.200000003     ..   1.00000000
     Approximate sky value =   [sky]     +-   [skysig]
     Pixels used for sky determination =       10000

Object detection table
Column | Description | unit
--- | --- | ---
X | Horizontal coordinate | pix
Y | Vertical coordinate | pix
SHARP | sharp parameter |
ROUND | round parameter |
PEAKRATIO | Ratio of peak to background (sky level) |

The table is sorted by PEAKRATIO column in decrease order (with bright stars on top).

# Aperture Photometry Table: APERPHOT

This extension contains aperture photometry of all object in a given set of apertures. Also a sky level measured in a ring shaped neighbourhood of every star is estimated.

## Header Keywords

Keywords
Keyword | Units | Description
--- | --- | ---
EXTNAME |  | APERPHOT as the identifier of this table
HWHM |  | HWHM estimated by momentum method
NAPER |  | Count of apertures
APERi | pix | Radius of i-th aperture, i = 1..NAPER
ANNULUS1 | pix | inner sky annulus radius in pixels
ANNULUS2 | pix | outer sky annulus radius in pixels

## Table

The aperture photometry table.

Object detection table
Column | Description | unit
--- | --- | ---
X | Horizontal coordinate[§] | pix
Y | Vertical coordinate[§] | pix
SKY | counts | Sky level
SKYERR | counts | Sky level error
APCOUNTi | counts | Sum of counts in i-th aperture[*]
APCOUNTERRi | counts | Statistical error of APCOUNTi

[§] This column is a direct copy of one from FIND extension.

[*] Negative values means impossibility to determine the value. Common reasons are: the high sky background level (for faint stars) or a large aperture radius exceeding frame boundary (for stars near an edge) or saturation (for very bright stars).

# Growth-Curve Photometry Table: GROWPHOT

This extension contains results of growth-curve photometry for all stars in APERPHOT table.

## Header Keywords

Keywords
Keyword | Units | Description
--- | --- | ---
EXTNAME |  | GROWCURVE as the identifier of this table
HWHM | pix | HWHM estimated by growth curve in pixels
RADFLX90 | pix | Radius containing 90% of energy

## Table

GROWPHOT extension
Column | Description | unit
--- | --- | ---
X | Horizontal coordinate | pix
Y | Vertical coordinate | pix
SKY | Sky level[^] | count
SKYERR | Statistical error of sky level | count
GCOUNT | Growth curve estimated total sum of counts for an infinite aperture[*] | count
GCOUNTERR | Statistical error of APCOUNT | count
GROWFLAG | Classification: used (0), not used (1) for construction of growth-curve, non-stellar object (2). |

[^] Values of sky will generall differ from those from the aperture photometry table APERPHOT. Growth-curve photometry gives corrections to the sky.

# Growth-Curve Table: GROWCURVE

This extension saves growth curve and derived radial profile in selected apertures.

GROWCURVE extension
Column | Description | unit
--- | --- | ---
R | Radius of the aperture | pix
GROWCURVE | growth curve value at R |
GROWCURVEERR | Statistical error of growth curve |
RADIALPROFILE | Radial profile at R |

## See Also

Detection of Stars, Aperture Photometry, Growth Curve Overview.