-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselwavel.c
executable file
·44 lines (40 loc) · 1.57 KB
/
selwavel.c
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
/***************************************************************************
selwavel.c - select wavelengths
-------------------
begin : Sat Mar 9 09:51:02 GMT 2002
copyright : (C) 2002 by Gwyndaf Evans
email : gwyndaf@gwyndafevans.co.uk
***************************************************************************/
/***************************************************************************
* *
* This program 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
int selwavel(int n, double *fXfpp, double *fpp, double *fp)
{
extern double fpInfl, fppInfl, fpPeak, fppPeak, EInfl, EPeak;
int i;
fpInfl = 10000000;
fppPeak = -10000000;
for (i = 0; i < n; i++) {
if(fp[i] < fpInfl){
fpInfl = fp[i];
fppInfl = fpp[i];
EInfl = fXfpp[i];
}
if(fpp[i] > fppPeak){
fpPeak = fp[i];
fppPeak = fpp[i];
EPeak = fXfpp[i];
}
}
return EXIT_SUCCESS;
}