Main Page | Class List | Directories | File List | Class Members | File Members

fitsoutput.h File Reference

Writing data into FITS files. More...

Go to the source code of this file.

Defines

#define __fitsoutput_h   1

Functions

void write_fitsfile (unsigned char *data, int size)
 writes data into a fitsfile
int close_fitsfile (void)
 Closes a fitsfile.
int init_fitsfile (void)
 Open a fitsfile and set header keywords.
int init_fitsfile_noheader (int xsize, int ysize)
 Open a fitsfile and without setting header keywords.
void fitsoutput_set_dap (struct dap_struct dap)
 sets the Data Associated Parameters.
char * fitsoutput_get_filename ()
 returns the current filename.
void fitsoutput_set_ccd (struct ccd_struct ccd)
 sets the CCD parameters.
int fitsfile_shutter_opening ()
 called when the shutter is just opening
int fitsfile_shutter_closing ()
 called when the shutter is just closing
int fitsfile_create_image (int xsize, int ysize)
 creates an image to be written into the fits file. And write the header keywords.
void fitsoutput_postproc (char *filename)
 postprocesses the fits file
dap_struct fitsoutput_get_dap (void)
 returns a structure describing the current Data Associated Parameters.
void ui_fitsoutput_status_changed (struct fitsoutput_status_struct)
 called by fitsoutput.c whenever its status changed.
fitsoutput_status_struct fitsoutput_get_status (void)
 returns a structure describing the current status of fitsoutput.

Variables

fitsoutput_status_struct fitsoutput_status
volatile int fitsoutput_write_file


Detailed Description

Writing data into FITS files.

Copyright (C) 2001-2003 Dirk Huenniger (dhun@astro.uni-bonn.de)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.


Function Documentation

int close_fitsfile void   ) 
 

Closes a fitsfile.

Returns:
int the fitsio status code of the fitsfile closed or 0 if the file was not open
This function closes a fitsfile. It returns 0 if the fitsfile is not open.

int fitsfile_create_image int  xsize,
int  ysize
 

creates an image to be written into the fits file. And write the header keywords.

Returns:
int status code This function creates an image to be written into the fits file. Futhermore it write all header keywords.

int fitsfile_shutter_closing  ) 
 

called when the shutter is just closing

Returns:
int 0
This functión is called whenever the shutter is just closing. It stores some parameters of the system to be writting into the fits file later on.

int fitsfile_shutter_opening  ) 
 

called when the shutter is just opening

Returns:
int 0
This functión is called whenever the shutter is just opening. It stores some parameters of the system to be writting into the fits file later on.

struct dap_struct fitsoutput_get_dap void   ) 
 

returns a structure describing the current Data Associated Parameters.

Returns:
dap_struct a struct descibing the current Data Associated Parameters
This function returns a structure describing the current Data Associated Parameters.

char* fitsoutput_get_filename void   ) 
 

returns the current filename.

Returns:
char* a string containing the current filename
This function returns the current filename.

struct fitsoutput_status_struct fitsoutput_get_status void   ) 
 

returns a structure describing the current status of fitsoutput.

Returns:
fitsoutput_status_struct a struct descibing the current status of fitsoutput
This function returns a structure describing the current status of fitsoutput.

void fitsoutput_postproc char *  filename  ) 
 

postprocesses the fits file

Returns:
void
This function postprecesses the fits file. It runs sextractor, calculates the median of the FWHMs and add it to this image statistics. Futhermore it write the image statistics to the tex logfile, and informs the automated mode about the finished calculation. Appart from that it also calculates the MD5 sum of the image in order to detect transfer errors

void fitsoutput_set_ccd struct ccd_struct  ccd  ) 
 

sets the CCD parameters.

Parameters:
dap a struct containing the CCD parameters to be set
Returns:
void
This function sets the CCD parameters.

void fitsoutput_set_dap struct dap_struct  dap  ) 
 

sets the Data Associated Parameters.

Parameters:
dap a struct containing the Data Associated Parameters to be set
Returns:
void
This function sets the Data Associated Parameters.

int init_fitsfile void   ) 
 

Open a fitsfile and set header keywords.

Returns:
int the fitsio status code of the fitsfile opened or -1 if the file could not be opened
This function opens a fitsfile. The the filenumber in the conguration file is used to create the filename. If the file allready exsists the filenumber is increased up to 10000 time to find a free filename. The header keywords are set up.

int init_fitsfile_noheader int  xsize,
int  ysize
 

Open a fitsfile and without setting header keywords.

Parameters:
xsize the size of the image in x direction.
ysize the size of the image in y direction.
Returns:
int the fitsio status code of the fitsfile opened or -1 if the file could not be opened
This function opens a fitsfile. The the filenumber in the conguration file is used to create the filename. If the file allready exsists the filenumber is increased up to 10000 time to find a free filename. No header keywords are set up. This function is only used if and exposure is requested by a user command in the CCU termninal window.

the current filename

void ui_fitsoutput_status_changed struct fitsoutput_status_struct  status  ) 
 

called by fitsoutput.c whenever its status changed.

Parameters:
status a fitsoutput_status_struct preresenting the current status of fitsoutput.c.
Returns:
void
This function is called by fitsoutput.c whenever its status changed. It is declared as an abstract function in fitsoutput.h and implemented here.

void write_fitsfile unsigned char *  data,
int  size
 

writes data into a fitsfile

Parameters:
data a pointer to a region in memory containing the data to be writen.
size the number of bytes to be writen
Returns:
void
This function writes data into a fitsfile. The fitsfile has to be opend using init_fitsfile before any data can be writen.


Variable Documentation

struct fitsoutput_status_struct fitsoutput_status
 

a stuct representing the current status of fitsoutput

volatile int fitsoutput_write_file
 

1 if the current fitsfile shall actually be writen to disk. Set to 0 if you just want to perform operation in memmory


Generated on Fri Dec 16 22:23:37 2005 for gboccia by  doxygen 1.4.2