grasp_parameters.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 CNRS & Universite Lille 1. All rights reserved.
3  *
4  * Licensed under the GRASP Open Source License V1.0 (see LICENSE file)
5  */
6 
20 #ifndef GRASP_PARAMETERS_H
21 #define GRASP_PARAMETERS_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include "mod_par_OS.inc"
28 #include "mod_par_inv.inc"
29 #include <stdbool.h>
30 
31  typedef struct par_number_NDIM_{
32  int n1 ;
33  int n2 [_KIDIM1] ;
34  int n3 [_KIDIM1][_KIDIM2];
35  int ISTARSING [_KIDIM1][_KIDIM2];
36  int par_type [_KIDIM1];
37  bool par_retr [_KIDIM1];
39 
40 
50  void grasp_parameters_initialize(float iguess[_KIMAGE][_KPARS]);
51 
64  void grasp_parameters_get_characteristic_type_longname_by_parameter_number(par_number_NDIM *dimensions, int parameter_number, char *characteristic_name, int size_characteristic_name);
65 
78  void grasp_parameters_get_characteristic_type_shortname_by_parameter_number(par_number_NDIM *dimensions, int parameter_number, char *characteristic_name, int size_characteristic_name);
79 
90  void grasp_parameters_get_characteric_type_pretty_name_by_parameter_number(par_number_NDIM *dimensions, int parameter_number, bool longname, float wavelenghts[_KW], int wavelenghts_involved[_KPARS], char *characteristic_name, int size_characteristic_name);
91 
99 
107 
114  int grasp_parameters_get_mode_by_parameter_number(par_number_NDIM *dimensions, int parameter_number);
115 
122  int grasp_parameters_get_position_by_parameter_number(par_number_NDIM *dimensions, int parameter_number);
123 
129  int grasp_parameters_get_position_of_characteristic(par_number_NDIM *dimensions, int parameter_number);
130 
137  int grasp_parameters_index_of_parameter_type(par_number_NDIM *dimensions, int characteristic_type);
138 
148  int grasp_parameters_index_of_parameter_type_by_kind_of_parameter(par_number_NDIM *dimensions, int begin_characteristic_type, int end_characteristic_type);
149 
159  int grasp_parameters_characteristic_code_present_of_kind_of_parameter(par_number_NDIM *dimensions, int begin_characteristic_type, int end_characteristic_type);
160 
167  bool grasp_parameters_has_parameter_type(par_number_NDIM *dimensions, int characteristic_type);
168 
179  int grasp_parameters_set_value(par_number_NDIM *dimensions, float iguess[_KPARS], int characteristic_type, int mode , int pos, float value);
180 
187  int grasp_parameters_number_of_modes_of_parameter(par_number_NDIM *dimensions, int characteristic_type);
188 
196  int grasp_parameters_number_of_elements_of_parameter(par_number_NDIM *dimensions, int characteristic_type, int mode);
197 
207  float grasp_parameters_output_get_value(par_number_NDIM *dimensions, const float parameters[_KPARS], int characteristic_type, int mode , int pos);
208 
218  int grasp_parameters_get_position(par_number_NDIM *dimensions, int characteristic_type, int mode , int pos);
219 
233  float grasp_parameters_iguess_get_value(par_number_NDIM *dimensions, float APSING[_KPARS], float iguess[_KPARS], float APSMIN[_KPARS], float APSMAX[_KPARS], int characteristic_type, int mode , int pos);
234 
235 
236 
237 
238 
239 #ifdef __cplusplus
240 }
241 #endif
242 
243 #endif /* GRASP_PARAMETERS_H */
244 
float grasp_parameters_output_get_value(par_number_NDIM *dimensions, const float parameters[_KPARS], int characteristic_type, int mode, int pos)
Definition: grasp_parameters.c:285
int grasp_parameters_set_value(par_number_NDIM *dimensions, float iguess[_KPARS], int characteristic_type, int mode, int pos, float value)
Set in initial guess array a value.
Definition: grasp_parameters.c:230
int grasp_parameters_get_position(par_number_NDIM *dimensions, int characteristic_type, int mode, int pos)
Definition: grasp_parameters.c:299
int grasp_parameters_index_of_parameter_type(par_number_NDIM *dimensions, int characteristic_type)
Look for the index of a characteristic type.
Definition: grasp_parameters.c:185
bool par_retr[_KIDIM1]
Definition: grasp_parameters.h:37
int grasp_parameters_index_of_parameter_type_by_kind_of_parameter(par_number_NDIM *dimensions, int begin_characteristic_type, int end_characteristic_type)
Definition: grasp_parameters.c:197
bool grasp_parameters_has_parameter_type(par_number_NDIM *dimensions, int characteristic_type)
Checks if a characteristic was set in settings.
Definition: grasp_parameters.c:222
int n1
Definition: grasp_parameters.h:32
int grasp_parameters_get_characteristic_index_by_parameter_number(par_number_NDIM *dimensions, int parameter_number)
Get the index of the characteristic in NDIM.N1 array.
Definition: grasp_parameters.c:24
void grasp_parameters_get_characteristic_type_longname_by_parameter_number(par_number_NDIM *dimensions, int parameter_number, char *characteristic_name, int size_characteristic_name)
Retrieve the name (long) of a characteristic knowing its position.
Definition: grasp_parameters.c:97
int n3[_KIDIM1][_KIDIM2]
Definition: grasp_parameters.h:34
int grasp_parameters_number_of_modes_of_parameter(par_number_NDIM *dimensions, int characteristic_type)
Definition: grasp_parameters.c:252
int par_type[_KIDIM1]
Definition: grasp_parameters.h:36
Definition: grasp_parameters.h:31
int grasp_parameters_number_of_elements_of_parameter(par_number_NDIM *dimensions, int characteristic_type, int mode)
Definition: grasp_parameters.c:267
void grasp_parameters_get_characteric_type_pretty_name_by_parameter_number(par_number_NDIM *dimensions, int parameter_number, bool longname, float wavelenghts[_KW], int wavelenghts_involved[_KPARS], char *characteristic_name, int size_characteristic_name)
Retrieve the name of the characteristic of a parameter like a unique string take into account the wav...
Definition: grasp_parameters.c:132
int grasp_parameters_get_mode_by_parameter_number(par_number_NDIM *dimensions, int parameter_number)
Definition: grasp_parameters.c:54
int grasp_parameters_get_position_by_parameter_number(par_number_NDIM *dimensions, int parameter_number)
Definition: grasp_parameters.c:78
int grasp_parameters_get_position_of_characteristic(par_number_NDIM *dimensions, int parameter_number)
Definition: grasp_parameters.c:88
struct par_number_NDIM_ par_number_NDIM
void grasp_parameters_get_characteristic_type_shortname_by_parameter_number(par_number_NDIM *dimensions, int parameter_number, char *characteristic_name, int size_characteristic_name)
Retrieve the name (short) of a characteristic knowing its position.
Definition: grasp_parameters.c:114
int ISTARSING[_KIDIM1][_KIDIM2]
Definition: grasp_parameters.h:35
void grasp_parameters_initialize(float iguess[_KIMAGE][_KPARS])
Initialize a matrix structure of parameters.
Definition: grasp_parameters.c:14
int n2[_KIDIM1]
Definition: grasp_parameters.h:33
int grasp_parameters_get_characteristic_code_by_parameter_number(par_number_NDIM *dimensions, int parameter_number)
Definition: grasp_parameters.c:41
int grasp_parameters_characteristic_code_present_of_kind_of_parameter(par_number_NDIM *dimensions, int begin_characteristic_type, int end_characteristic_type)
Definition: grasp_parameters.c:209
float grasp_parameters_iguess_get_value(par_number_NDIM *dimensions, float APSING[_KPARS], float iguess[_KPARS], float APSMIN[_KPARS], float APSMAX[_KPARS], int characteristic_type, int mode, int pos)
Definition: grasp_parameters.c:320