phoebe_ld

phoebe_ld

Synopsis

                    LD_table;
extern              LD_table *PHOEBE_ld_table;
enum                LDLaw;
LD_table*           phoebe_ld_table_vh1993_load         (char *dir);
int                 phoebe_ld_table_free                (LD_table *LD);
int                 phoebe_ld_get_coefficients          (LDLaw ldlaw,
                                                         PHOEBE_passband *passband,
                                                         double M,
                                                         double T,
                                                         double lg,
                                                         double *x,
                                                         double *y);
LDLaw               phoebe_ld_model_type                (const char *ldlaw);
char*               phoebe_ld_get_vh1993_passband_name  (PHOEBE_passband *passband);

Description

Details

LD_table

typedef struct {
	PHOEBE_array *Mnodes;
	PHOEBE_array *Tnodes;
	PHOEBE_array *lgnodes;
	struct {
		char *fn;
		long int pos;
	} ***table;
} LD_table;


PHOEBE_ld_table

extern LD_table *PHOEBE_ld_table;


enum LDLaw

typedef enum LDLaw {
	LD_LAW_LINEAR = 1,
	LD_LAW_LOG,
	LD_LAW_SQRT,
	LD_LAW_INVALID
} LDLaw;


phoebe_ld_table_vh1993_load ()

LD_table*           phoebe_ld_table_vh1993_load         (char *dir);

Scans all files in the passed directory dir and extracts LD triplets (T, log g, M/H) from table headers. It then creates a 3D matrix what holds all of these elements so that LD[M][T][lg] is structured by indices and all non-existing nodes padded with nans. For optimized lookup this matrix has a border of nans in all three directions - so that the lookup function does not have to check for matrix boundaries.

dir :

directory that contains Van Hamme (1993) LD tables

Returns :

PHOEBE_error_code.

phoebe_ld_table_free ()

int                 phoebe_ld_table_free                (LD_table *LD);

Frees the contents of the limb darkening table LD. It is safe to call this function on the unallocated table, so there is no need to check for LD presence.

LD :

limb darkening table

Returns :

PHOEBE_error_code.

phoebe_ld_get_coefficients ()

int                 phoebe_ld_get_coefficients          (LDLaw ldlaw,
                                                         PHOEBE_passband *passband,
                                                         double M,
                                                         double T,
                                                         double lg,
                                                         double *x,
                                                         double *y);

ldlaw :

passband :

M :

T :

lg :

x :

y :

Returns :


phoebe_ld_model_type ()

LDLaw               phoebe_ld_model_type                (const char *ldlaw);

ldlaw :

Returns :


phoebe_ld_get_vh1993_passband_name ()

char*               phoebe_ld_get_vh1993_passband_name  (PHOEBE_passband *passband);

passband :

Returns :