TwiceAsNice  2019-02-18
Macros | Functions
som.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "define.h"
#include "globals.h"
#include "fits/fitscat.h"
#include "prefs.h"
#include "som.h"
Include dependency graph for som.c:

Macros

#define SHFT(a, b, c, d)   {(a)=(b);(b)=(c);(c)=(d);} /* For line-search */
 
#define SIGN(a, b)   ((b)>0.0? fabs(a) : -fabs(a)) /* For line-search */
 
#define GOLD   1.6180340 /* Golden section for line-search */
 
#define CGOLD   0.3819660 /* Complement to the golden section */
 
#define TINY   1e-20 /* Almost nothing */
 
#define GLIMIT   100.0 /* Max. magnification in line-search */
 
#define ITMAX   100 /* Max. nb of iter. in line-search */
 
#define TOL   1e-1 /* Fract. tolerance in line-search */
 
#define ITMAX   100
 
#define EPS   1.0e-10
 

Functions

void som_phot (somstruct *som, float back, float backnoise, float gain, float dx0, float dy0, float *vector, float clip)
 
int som_mkweight (somstruct *som, float back, float backnoise, float gain)
 
float som_err (somstruct *som, float dist, int flags)
 
float som_linmin (somstruct *som)
 
void som_conjgrad (somstruct *som, float ftol)
 
void som_end (somstruct *som)
 
somstructsom_load (char *filename)
 

Macro Definition Documentation

◆ CGOLD

#define CGOLD   0.3819660 /* Complement to the golden section */

◆ EPS

#define EPS   1.0e-10

◆ GLIMIT

#define GLIMIT   100.0 /* Max. magnification in line-search */

◆ GOLD

#define GOLD   1.6180340 /* Golden section for line-search */

◆ ITMAX [1/2]

#define ITMAX   100 /* Max. nb of iter. in line-search */

◆ ITMAX [2/2]

#define ITMAX   100

◆ SHFT

#define SHFT (   a,
  b,
  c,
  d 
)    {(a)=(b);(b)=(c);(c)=(d);} /* For line-search */

◆ SIGN

#define SIGN (   a,
  b 
)    ((b)>0.0? fabs(a) : -fabs(a)) /* For line-search */

◆ TINY

#define TINY   1e-20 /* Almost nothing */

◆ TOL

#define TOL   1e-1 /* Fract. tolerance in line-search */

Function Documentation

◆ som_conjgrad()

void som_conjgrad ( somstruct som,
float  ftol 
)

◆ som_end()

void som_end ( somstruct som)

◆ som_err()

float som_err ( somstruct som,
float  dist,
int  flags 
)

◆ som_linmin()

float som_linmin ( somstruct som)

◆ som_load()

somstruct* som_load ( char *  filename)

◆ som_mkweight()

int som_mkweight ( somstruct som,
float  back,
float  backnoise,
float  gain 
)

◆ som_phot()

void som_phot ( somstruct som,
float  back,
float  backnoise,
float  gain,
float  dx0,
float  dy0,
float *  vector,
float  clip 
)