Skip to content

fix missing headers and issues with old FITS files for a22 and e3#1

Open
danehkar wants to merge 3 commits intoABHModels:mainfrom
xstarkit:main
Open

fix missing headers and issues with old FITS files for a22 and e3#1
danehkar wants to merge 3 commits intoABHModels:mainfrom
xstarkit:main

Conversation

@danehkar
Copy link

@danehkar danehkar commented Oct 9, 2024

fix missing header issues and function declaration issues with gcc (GCC) 14.2.1 20240912.

relutility.h: declare functions in th header:

int is_densgrad_model(int rmodel_type, int xmodel_type, int ion_grad_type );

void get_version_number_nk(char** vstr, int* status);

rellp.c: add a missing header:
#include "relrc.h"

relrc.h: declare a function in th header:
void get_emis_disk_corona(relParam* param, double* emis, double* re, int n_r, int* status);

reltable.h: declare a function in th header:
void init_rc_table(char* filename, rcTable** inp_tab, int* status);

reltable.c: change from
lpDat* load_single_lp_nk_Dat(fitsfile* fptr, int n_h, int n_rad, int i, int j, int rownum, double defpar[], int nhdu, int* status)
to
lpDat* load_single_lp_nk_Dat(fitsfile* fptr, int n_h, int n_rad, int i, int j, int rownum, float defpar[], int nhdu, int* status)

fix missing header issues and function declaration issues with gcc (GCC) 14.2.1 20240912
Fix issue with old FITS files for for a22 (Trf_Johannsen_a22.fits) and e3 (Trf_Johannsen_e3.fits).
@danehkar
Copy link
Author

fix the issues with old FITS files for a22 (Trf_Johannsen_a22.fits) and e3 (Trf_Johannsen_e3.fits). RELNKTABLE_NG is 40 in Trf_Johannsen_a13.fits, but it is 20 in Trf_Johannsen_a22.fits and Trf_Johannsen_e3.fits.

reltable.c: add:
extern int rel_nk_table_ng;

relbase.h: add:
#define RELNKTABLE_NG_OLD 20

relbase.c: add:

char* get_filename(int * status){
int mdot_type = current_mdot_type;
int def_par_type = current_def_par_type;
// printf("%d %d\n", def_par_type, mdot_type);
rel_nk_table_ng=RELNKTABLE_NG_OLD;
if (mdot_type == 0) {
if (def_par_type == 1) {
       rel_nk_table_ng=RELNKTABLE_NG;

relatable.c: replaced RELNKTABLE_NG with rel_nk_table_ng

@danehkar danehkar changed the title fix missing header issues fix missing headers and issues with old FITS files for a22 and e3 Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant