This repository was archived by the owner on Dec 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreltable.h
More file actions
93 lines (70 loc) · 2.12 KB
/
Copy pathreltable.h
File metadata and controls
93 lines (70 loc) · 2.12 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
This file is part of the RELXILL model code.
RELXILL is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
RELXILL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
For a copy of the GNU General Public License see
<http://www.gnu.org/licenses/>.
Copyright 2020 Thomas Dauser, Remeis Observatory & ECAP
*/
#ifndef RELTABLE_H_
#define RELTABLE_H_
#include "relbase.h"
#include "relutility.h"
/** a single element in the RELLINE table array */
typedef struct {
float *r;
float *gmin;
float *gmax;
float **trff1;
float **trff2;
float **cosne1;
float **cosne2;
} relDat;
/** the RELLINE table structure */
typedef struct {
float *a; // spin
int n_a;
float *mu0; // inclination
int n_mu0;
relDat ***arr; // relline data array
// dimensions of relline array
int n_r;
int n_g;
} relTable;
/** the LAMP POST single data structure */
typedef struct {
float *h; // height
float *rad; // radius
float **intens;
float **del;
float **del_inc;
} lpDat;
/** the LAMP POST table structure */
typedef struct {
float *a; // spin
int n_a;
int n_h;
int n_rad;
lpDat **dat;
} lpTable;
/* create a new LP table */
lpTable *new_lpTable(int n_a, int n_h, int n_intens, int *status);
/* destroy the LP table structure */
void free_lpTable(lpTable *tab);
/* destroy the LP dat structure */
void free_lpDat(lpDat *dat, int nh);
/* create a new relline table structure */
relTable *new_relTable(int n_a, int n_mu0, int n_r, int n_g, int *status);
/* destroy the relline table structure */
void free_relTable(relTable *tab);
/* routine to read the RELLINE table */
void read_relline_table(char *filename, relTable **tab, int *status);
/* routine to read the LP table */
void read_lp_table(char *filename, lpTable **inp_tab, int *status);
#endif /* RELTABLE_H_ */