phoebe_data

phoebe_data

Synopsis

extern              PHOEBE_passband **PHOEBE_passbands;
extern              int               PHOEBE_passbands_no;
PHOEBE_passband*    phoebe_passband_new                 ();
PHOEBE_passband*    phoebe_passband_new_from_file       (char *filename);
PHOEBE_passband*    phoebe_passband_lookup              (const char *name);
PHOEBE_passband*    phoebe_passband_lookup_by_id        (const char *id);
int                 phoebe_passband_free                (PHOEBE_passband *passband);
int                 phoebe_read_in_passbands            (char *dir_name);
int                 phoebe_free_passbands               ();
int                 wd_passband_id_lookup               (int *id,
                                                         const char *passband);

Description

Details

PHOEBE_passbands

extern PHOEBE_passband **PHOEBE_passbands;


PHOEBE_passbands_no

extern int               PHOEBE_passbands_no;


phoebe_passband_new ()

PHOEBE_passband*    phoebe_passband_new                 ();

Initializes memory for a new PHOEBE_passband and sets all fields to NULL.

Returns :

PHOEBE_passband.

phoebe_passband_new_from_file ()

PHOEBE_passband*    phoebe_passband_new_from_file       (char *filename);

Reads in passband transmission function (PTF) from the passed filename.

Passband transmission functions are installed in a directory the path to which is stored in a PHOEBE_PTF_DIR variable. In order to be able to pass a relative filename to phoebe_hist_new_from_file(), this wrapper does the following, sequentially:

1) if an absolute path is passed, use it; 2) if there is a file with that name in the current directory, use it; 3) if there is a file with that name in PHOEBE_PTF_DIR, use it; 4) admit defeat and return NULL.

filename :

passband transmission function file

Returns :

PHOEBE_passband on success, NULL on failure.

phoebe_passband_lookup ()

PHOEBE_passband*    phoebe_passband_lookup              (const char *name);

Traverses the global passband table PHOEBE_passbands and returns a pointer to the passband that matches the passed name. The name is constructed by PASS_SET:PASSBAND, i.e. "Johnson:V".

name :

passband name, of the form PASS_SET:PASSBAND

Returns :

PHOEBE_passband on success, or NULL if name is not matched.

phoebe_passband_lookup_by_id ()

PHOEBE_passband*    phoebe_passband_lookup_by_id        (const char *id);

Looks up the passband that corresponds to the curve id.

id :

curve ID (light or RV curve)

Returns :

PHOEBE_passband on success, or NULL if id is not matched.

phoebe_passband_free ()

int                 phoebe_passband_free                (PHOEBE_passband *passband);

Frees passband memory.

passband :

PHOEBE_passband to be freed

Returns :


phoebe_read_in_passbands ()

int                 phoebe_read_in_passbands            (char *dir_name);

Opens the dir_name directory, scans all files in that directory and reads in all found passbands. Finally, it sorts them first by effective wavelength and then by set name.

dir_name :

directory where passband transmission functions (PTFs) are stored

Returns :

PHOEBE_error_code.

phoebe_free_passbands ()

int                 phoebe_free_passbands               ();

Traverses all defined passbands and frees them.

Returns :

PHOEBE_error_code.

wd_passband_id_lookup ()

int                 wd_passband_id_lookup               (int *id,
                                                         const char *passband);

Looks up the WD ID of the passband. If the passband is not set or if it is not supported by WD, ERROR_PASSBAND_INVALID is returned.

id :

WD passband ID

passband :

PHOEBE passband name

Returns :

PHOEBE_error_code.