File: transform.h

package info (click to toggle)
fitsh 0.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,768 kB
  • ctags: 4,050
  • sloc: ansic: 53,352; makefile: 1,120; sh: 25
file content (48 lines) | stat: -rw-r--r-- 1,640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*****************************************************************************/
/* transform.h								     */
/*****************************************************************************/

#ifndef	__TRANSFORM_H_INCLUDED
#define	__TRANSFORM_H_INCLUDED	1

#include <stdio.h>

#define		TRANS_POLYNOMIAL	1
#define		TRANS_ZOOM		2
#define		TRANS_SHRINK		3

#define		TRANS_WR_COMMENT	0x01
#define		TRANS_WR_DXDY		0x02
#define		TRANS_WR_IEEE_32	0x04
#define		TRANS_WR_IEEE_64	0x08

/*****************************************************************************/

typedef struct 
 {	int	type;
	int	order;
	int	nval;
	double	**vfits;
	double	ox,oy,scale;
 } transformation;

/*****************************************************************************/

int	transformation_free(transformation *tf);
int	transformation_read_data(FILE *fr,transformation *tf);
int	transformation_parse_params(char *params,transformation *tf);
int	transformation_write_data(FILE *fr,transformation *tf,int flags);

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

int	transformation_check_if_null(transformation *tf);

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

int	transformation_get_jacobi(transformation *tf,double **rjxx,double **rjxy,double **rjyx,double **rjyy);
int	transformation_eval_normal_2d(double x,double y,transformation *tf,double *rx,double *ry);
int	transformation_eval_invert_2d(double x,double y,transformation *tf,double *rx,double *ry,double *jxx,double *jxy,double *jyx,double *jyy);

/*****************************************************************************/

#endif