Welcome to iraf.net Sunday, May 19 2024 @ 10:49 PM GMT
Anonymous: Guest |
02/09/1997 09:52PM (Read 333 times)
|
|
|
|
Hello there,
Thanks for your help the other day with the issue of
obtaining double-precision in imexpr. I am using imexpr
now to create images from a 17-order power series.
However, it is behaving as though it is not calculating
the higher-order terms in the series. I have tried
lower order (9 and 5-order) series and these have
appeared to work OK.I am specifying the power-series to imexpr in a textfile,
containing the expression.e.g.cl> ty calc_file
( double (sqrt((I-510)**2 +(J-310)**2))**0. ) * 192.2297 +
( double (sqrt((I-510)**2 +(J-310)**2))**1. ) * 0.2104352 +
( double (sqrt((I-510)**2 +(J-310)**2))**2. ) * -0.003835358 +
( double (sqrt((I-510)**2 +(J-310)**2))**3. ) * -4.5225210000000E-4 +
( double (sqrt((I-510)**2 +(J-310)**2))**4. ) * 2.7209000000000E-5 +
( double (sqrt((I-510)**2 +(J-310)**2))**5. ) * -6.7355520000000E-7 +
( double (sqrt((I-510)**2 +(J-310)**2))**6. ) * 9.4640780000000E-9 +
( double (sqrt((I-510)**2 +(J-310)**2))**7. ) * -8.4980860000000E-11 +
( double (sqrt((I-510)**2 +(J-310)**2))**8. ) * 5.1878580000000E-13 +
( double (sqrt((I-510)**2 +(J-310)**2))**9. ) * -2.2296470000000E-15 +
( double (sqrt((I-510)**2 +(J-310)**2))**10. ) * 6.8685380000000E-18 +
( double (sqrt((I-510)**2 +(J-310)**2))**11. ) * -1.5236980000000E-20 +
( double (sqrt((I-510)**2 +(J-310)**2))**12. ) * 2.4135920000000E-23 +
( double (sqrt((I-510)**2 +(J-310)**2))**13. ) * -2.6625960000000E-26 +
( double (sqrt((I-510)**2 +(J-310)**2))**14. ) * 1.9428960000000E-29 +
( double (sqrt((I-510)**2 +(J-310)**2))**15. ) * -8.4272360000000E-33 +
( double (sqrt((I-510)**2 +(J-310)**2))**16. ) * 1.6447800000000E-36 +
0.
cl>
Here, the double (sqrt((I-510)**2 +(J-310)**2)) is simply the dependent
variable in the series. Replace it by "R" say, (for radius, which is
what it actually is). Down the LHS above we have powers of R;
on the RHS we have the matching power-series coefficients.
This file is created from the power-series output of fits done by
curfit: 1 1.922297E2
2 2.104352E-1
3 -3.835358E-3
4 -4.522521E-4
5 2.720900E-5
6 -6.735552E-7
7 9.464078E-9
8 -8.498086E-11
9 5.187858E-13
10 -2.229647E-15
11 6.868538E-18
12 -1.523698E-20
13 2.413592E-23
14 -2.662596E-26
15 1.942896E-29
16 -8.427236E-33
17 1.644780E-36
Can you see why imexpr might truncate at higher-order?
I thought the double-precision fix might circumvent things
like this.Thanks once again for you help.Cheers,
Heath Jones
|
|
|
|
| |
|