Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FSI Data Acquisition Path Gateware and Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
FSI Data Acquisition Path Gateware and Software
Commits
afff4861
Commit
afff4861
authored
Jul 23, 2021
by
Juan David Gonzalez Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix indentations
parent
d02f3e08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
fsi.h
libfsi/fsi.h
+22
-16
No files found.
libfsi/fsi.h
View file @
afff4861
...
...
@@ -33,14 +33,14 @@ extern "C" {
/* two types of channel inputs: distance meas. or Bragg */
enum
fsi_channel_type
{
FSI_CH_NONE
=
0
,
FSI_CH_DISTANCE
=
1
,
/**< configure as distance meas. channel */
FSI_CH_NONE
=
0
,
FSI_CH_DISTANCE
=
1
,
/**< configure as distance meas. channel */
FSI_CH_BRAGG
,
/**< configure as Bragg channel */
};
/* types of functional forms to fit the peaks found */
enum
fsi_peak_type
{
FSI_PEAK_NONE
=
0
,
FSI_PEAK_NONE
=
0
,
FSI_PEAK_LORENTZ
=
1
,
/**< Cauchy-Lorentz 1/(1+xˆ2) distribution */
FSI_PEAK_GAUSS
,
/**< Gaussian (normal) distribution */
FSI_PEAK_SINC
,
/**< Sinc (sin(x)/x)) distribution */
...
...
@@ -76,18 +76,18 @@ enum fsi_expert_mode mode {
* A channel will be configured so that
*/
struct
fsi_peak_config
{
double
frequency
;
/**< estimated frequency where peak fits */
double
range1
,
range2
;
/**< estimated interval of peak range */
double
frequency
;
/**< estimated frequency where peak fits */
double
range1
,
range2
;
/**< estimated interval of peak range */
double
channel_gain
;
/**< FIXME: should be per-channel, not per-peak? */
enum
fsi_peak_type
type
;
/**< shape of peak to fit */
};
struct
fsi_peak_result
{
double
frequency
;
/**< center of peak fitted to data */
double
amplitude
;
/**< peak width derived from parameters */
double
snr
;
/**< peak signal-to-noise ratio (? tbd) */
double
frequency
;
/**< center of peak fitted to data */
double
amplitude
;
/**< peak width derived from parameters */
double
snr
;
/**< peak signal-to-noise ratio (? tbd) */
enum
fsi_peak_type
type
;
/**< shape of peak fit to data */
type
;
/**< shape of peak fit to data */
double
fit_params
[
FSI_MAX_MODEL_PARAMS
];
/**< goodness-of-fit params, model-dependent */
uint16_t
samples
[
FSI_PEAK_LENGTH
];
/**< actual peak samples */
...
...
@@ -99,12 +99,12 @@ struct fsi_peak_result {
* requested
*/
struct
fsi_channel_config
{
unsigned
int
channel_id
;
/**< channel to be configured */
unsigned
int
channel_id
;
/**< channel to be configured */
enum
fsi_channel_type
type
;
/**< type of channel (distance/Bragg) */
double
channel_gain
;
/**< channel gain FIXME: see fsi_peak_request */
int
npeaks
;
/**< number of valid peaks to be requested in peaks array */
struct
fsi_peak_config
peaks
[
FSI_MAX_PEAKS
];
/**< peak requests
peaks
[
FSI_MAX_PEAKS
];
/**< peak requests
FIXME: should peak params be identical for all of them?
If so, this needs not be an array and npeaks is sufficient */
};
...
...
@@ -115,11 +115,17 @@ struct fsi_channel_config {
* function and its params, and an array of FSI_PEAK_LENGTH samples)
*/
struct
fsi_channel_measurement
{
unsigned
int
channel_id
;
/**< channel id of this measurement */
enum
fsi_channel_type
type
;
/**< type of channel (distance/Bragg) */
int
npeaks
;
/**< number of valid entries in peaks array */
struct
fsi_peak_result
peaks
[
FSI_MAX_PEAKS
];
/**< peak measured values */
unsigned
int
channel_id
;
/**< channel id of this measurement */
enum
fsi_channel_type
type
;
/**< type of channel (distance/Bragg) */
int
npeaks
;
/**< number of valid entries in peaks array */
struct
fsi_peak_result
peaks
[
FSI_MAX_PEAKS
];
/**< peak measured values */
};
struct
fsi_full_measurement
{
unsigned
int
channel_id
;
/**< channel id of this measurement */
enum
fsi_channel_type
type
;
/**< type of channel (distance/Bragg) */
enum
fsi_expert_mode
mode
;
/**< mode of raw data: linearized FFT/data/oscill-raw/gas-cell */
double
data
[
FSI_SAMPLE_SIZE
];
/**< raw data */
};
/* methods */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment