TwiceAsNice  2019-02-18
Macros | Functions
fitswcs.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fits/fitscat_defs.h"
#include "fits/fitscat.h"
#include "fitswcs.h"
#include "wcscelsys.h"
#include "wcs/wcs.h"
#include "wcs/lin.h"
#include "wcs/tnx.h"
#include "wcs/poly.h"
Include dependency graph for fitswcs.c:

Macros

#define FITSREADF(buf, k, val, def)
 
#define FITSREADI(buf, k, val, def)
 
#define FITSREADS(buf, k, str, def)
 

Functions

wcsstructcopy_wcs (wcsstruct *wcsin)
 
wcsstructcreate_wcs (char **ctype, double *crval, double *crpix, double *cdelt, int *naxisn, int naxis)
 
void init_wcs (wcsstruct *wcs)
 
void init_wcscelsys (wcsstruct *wcs)
 
wcsstructread_wcs (tabstruct *tab)
 
void write_wcs (tabstruct *tab, wcsstruct *wcs)
 
void wipe_wcs (tabstruct *tab)
 
void end_wcs (wcsstruct *wcs)
 
int wcs_supproj (char *name)
 
void invert_wcs (wcsstruct *wcs)
 
void range_wcs (wcsstruct *wcs)
 
int frame_wcs (wcsstruct *wcsin, wcsstruct *wcsout)
 
int reaxe_wcs (wcsstruct *wcs, int lng, int lat)
 
int celsys_to_eq (wcsstruct *wcs, double *wcspos)
 
int eq_to_celsys (wcsstruct *wcs, double *wcspos)
 
int raw_to_wcs (wcsstruct *wcs, double *pixpos, double *wcspos)
 
int wcs_to_raw (wcsstruct *wcs, double *wcspos, double *pixpos)
 
int red_to_raw (wcsstruct *wcs, double *redpos, double *pixpos)
 
int raw_to_red (wcsstruct *wcs, double *pixpos, double *redpos)
 
double wcs_dist (wcsstruct *wcs, double *wcspos1, double *wcspos2)
 
double wcs_scale (wcsstruct *wcs, double *pixpos)
 
double wcs_jacobian (wcsstruct *wcs, double *pixpos, double *jacob)
 
double wcs_rawtoraw (wcsstruct *wcsin, wcsstruct *wcsout, double *pixposin, double *pixposout, double *jacob)
 
int wcs_chirality (wcsstruct *wcs)
 
void precess_wcs (wcsstruct *wcs, double yearin, double yearout)
 
void precess (double yearin, double alphain, double deltain, double yearout, double *alphaout, double *deltaout)
 
void b2j (double yearobs, double alphain, double deltain, double *alphaout, double *deltaout)
 
void j2b (double yearobs, double alphain, double deltain, double *alphaout, double *deltaout)
 
char * degtosexal (double alpha, char *str)
 
char * degtosexde (double delta, char *str)
 
double sextodegal (char *hms)
 
double sextodegde (char *dms)
 
double fmod_0_p360 (double angle)
 
double fmod_m90_p90 (double angle)
 
double fmod_0_pmod (double angle, double mod)
 
double fmod_mmod_pmod (double angle, double mod)
 
int fcmp_0_p360 (double anglep, double anglem)
 

Macro Definition Documentation

◆ FITSREADF

#define FITSREADF (   buf,
  k,
  val,
  def 
)
Value:
{if (fitsread(buf,k, &val, H_FLOAT,T_DOUBLE) != RETURN_OK) \
val = def; \
}
#define RETURN_OK
Definition: define.h:116
const char &QWidget::show def("pushImage",(void(QImageView::*)(const ImageBase *))&QImageView::pushImage) .def("pushImage"
Definition: fitscat.h:83
int fitsread(char *fitsbuf, char *keyword, void *ptr, h_type htype, t_type ttype)
char * buf
Definition: catout.c:51
Definition: fitscat.h:87

◆ FITSREADI

#define FITSREADI (   buf,
  k,
  val,
  def 
)
Value:
{if (fitsread(buf,k, &val, H_INT,T_LONG) != RETURN_OK) \
val = def; \
}
#define RETURN_OK
Definition: define.h:116
const char &QWidget::show def("pushImage",(void(QImageView::*)(const ImageBase *))&QImageView::pushImage) .def("pushImage"
int fitsread(char *fitsbuf, char *keyword, void *ptr, h_type htype, t_type ttype)
char * buf
Definition: catout.c:51
Definition: fitscat.h:86
Definition: fitscat.h:83

◆ FITSREADS

#define FITSREADS (   buf,
  k,
  str,
  def 
)
Value:
strcpy(str, (def)); \
}
str
Definition: PupilGeneratorTest.py:379
#define RETURN_OK
Definition: define.h:116
const char &QWidget::show def("pushImage",(void(QImageView::*)(const ImageBase *))&QImageView::pushImage) .def("pushImage"
int fitsread(char *fitsbuf, char *keyword, void *ptr, h_type htype, t_type ttype)
char * buf
Definition: catout.c:51
Definition: fitscat.h:83
Definition: fitscat.h:87

Function Documentation

◆ b2j()

void b2j ( double  yearobs,
double  alphain,
double  deltain,
double *  alphaout,
double *  deltaout 
)

◆ celsys_to_eq()

int celsys_to_eq ( wcsstruct wcs,
double *  wcspos 
)

◆ copy_wcs()

wcsstruct* copy_wcs ( wcsstruct wcsin)

◆ create_wcs()

wcsstruct* create_wcs ( char **  ctype,
double *  crval,
double *  crpix,
double *  cdelt,
int *  naxisn,
int  naxis 
)

◆ degtosexal()

char* degtosexal ( double  alpha,
char *  str 
)

◆ degtosexde()

char* degtosexde ( double  delta,
char *  str 
)

◆ end_wcs()

void end_wcs ( wcsstruct wcs)

◆ eq_to_celsys()

int eq_to_celsys ( wcsstruct wcs,
double *  wcspos 
)

◆ fcmp_0_p360()

int fcmp_0_p360 ( double  anglep,
double  anglem 
)

◆ fmod_0_p360()

double fmod_0_p360 ( double  angle)

◆ fmod_0_pmod()

double fmod_0_pmod ( double  angle,
double  mod 
)

◆ fmod_m90_p90()

double fmod_m90_p90 ( double  angle)

◆ fmod_mmod_pmod()

double fmod_mmod_pmod ( double  angle,
double  mod 
)

◆ frame_wcs()

int frame_wcs ( wcsstruct wcsin,
wcsstruct wcsout 
)

◆ init_wcs()

void init_wcs ( wcsstruct wcs)

◆ init_wcscelsys()

void init_wcscelsys ( wcsstruct wcs)

◆ invert_wcs()

void invert_wcs ( wcsstruct wcs)

◆ j2b()

void j2b ( double  yearobs,
double  alphain,
double  deltain,
double *  alphaout,
double *  deltaout 
)

◆ precess()

void precess ( double  yearin,
double  alphain,
double  deltain,
double  yearout,
double *  alphaout,
double *  deltaout 
)

◆ precess_wcs()

void precess_wcs ( wcsstruct wcs,
double  yearin,
double  yearout 
)

◆ range_wcs()

void range_wcs ( wcsstruct wcs)

◆ raw_to_red()

int raw_to_red ( wcsstruct wcs,
double *  pixpos,
double *  redpos 
)

◆ raw_to_wcs()

int raw_to_wcs ( wcsstruct wcs,
double *  pixpos,
double *  wcspos 
)

◆ read_wcs()

wcsstruct* read_wcs ( tabstruct tab)

◆ reaxe_wcs()

int reaxe_wcs ( wcsstruct wcs,
int  lng,
int  lat 
)

◆ red_to_raw()

int red_to_raw ( wcsstruct wcs,
double *  redpos,
double *  pixpos 
)

◆ sextodegal()

double sextodegal ( char *  hms)

◆ sextodegde()

double sextodegde ( char *  dms)

◆ wcs_chirality()

int wcs_chirality ( wcsstruct wcs)

◆ wcs_dist()

double wcs_dist ( wcsstruct wcs,
double *  wcspos1,
double *  wcspos2 
)

◆ wcs_jacobian()

double wcs_jacobian ( wcsstruct wcs,
double *  pixpos,
double *  jacob 
)

◆ wcs_rawtoraw()

double wcs_rawtoraw ( wcsstruct wcsin,
wcsstruct wcsout,
double *  pixposin,
double *  pixposout,
double *  jacob 
)

◆ wcs_scale()

double wcs_scale ( wcsstruct wcs,
double *  pixpos 
)

◆ wcs_supproj()

int wcs_supproj ( char *  name)

◆ wcs_to_raw()

int wcs_to_raw ( wcsstruct wcs,
double *  wcspos,
double *  pixpos 
)

◆ wipe_wcs()

void wipe_wcs ( tabstruct tab)

◆ write_wcs()

void write_wcs ( tabstruct tab,
wcsstruct wcs 
)