Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96786274
o_set_start.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Dec 30, 20:33
Size
1 KB
Mime Type
text/x-c
Expires
Wed, Jan 1, 20:33 (2 d)
Engine
blob
Format
Raw Data
Handle
23226315
Attached To
R1448 Lenstool-HPC
o_set_start.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
/****************************************************************/
/* nom: o_set_start */
/* auteur: Jean-Paul Kneib */
/* date: 10/02/92 */
/* place: Toulouse */
/****************************************************************/
/* Set the starting values of each parameter for the lens i according
* to the limits settings in the parameters file */
void
o_set_start
(
int
i
,
int
block
[
NLMAX
][
NPAMAX
])
{
extern
struct
ipot
ip
;
double
a
,
b
,
lmin
,
lmax
,
x
;
int
ipx
;
for
(
ipx
=
0
;
ipx
<
ip
.
pmax
;
ipx
++
)
{
if
(
block
[
i
][
ipx
]
>
0
)
{
lmin
=
o_get_lmin
(
i
,
ipx
);
lmax
=
o_get_lmax
(
i
,
ipx
);
a
=
(
lmin
*
2.
+
lmax
)
/
3.
;
b
=
(
lmin
+
2.
*
lmax
)
/
3.
;
x
=
o_get_lens
(
i
,
ipx
);
x
=
Min
(
b
,
x
);
x
=
Max
(
a
,
x
);
o_set_lens
(
i
,
ipx
,
x
);
}
}
}
Event Timeline
Log In to Comment