Print

Print


On Fri, Feb 10, 2012 at 9:30 AM, Olе Streicher
<[log in to unmask]> wrote:
> Tim Jenness <[log in to unmask]> writes:
>> On Fri, Feb 10, 2012 at 4:45 AM, Olе Streicher
>> <[log in to unmask]> wrote:
>> We were only motivated to add the C wrappers to the functions that we
>> were actually using from C. The header file is complete so that it
>> matches the C/SLA header file.
>
> Thank you for your help here. I am very lucky about the good cooperation.
>
>> If you look hard in sla.c you will find an obfuscated version of
>> slaDeuler. We were using slaDeuler in a threaded section of the SMURF
>> application and the mutex completely destroyed performance. You will
>> have to deal with that. Note that we are actively creating a PAL
>> library which is a reimplementation of SLA in terms of SOFA. There is
>> a palDeuler already implemented so when SMURF and AST move to PAL we
>> can remove the obfuscated version of slaDeuler from SLA/F.
>
> Would you mind if I would just copy the palDeuler method to (debian's)
> slalib? I feel much better if there is no obfuscated code (and since
> both are GPL, it should be no problem).
>

You'll need to make a SOFA package first since PAL calls SOFA (I
thought it was crazy to re-implement all the SOFA routines in PAL).

> There is a minor glitch in the "d2he" and "de2h" functions, which
> seem to have a special implementation in astlib:
>
> // ast/pal.h
> void palSlaDe2h( double ha, double dec, double phi, double diurab,
>                 double *az, double *el);
>
> // sla/slalib.h
> void slaDe2h ( double ha, double dec, double phi, double *az, double *el );
>
> // pal/pal.h
> void palDe2h ( double ha, double dec, double phi,
>               double *az, double *el );
>

The PAL version deliberately matches the SLA API but the AST version
has a more accurate implementation that includes diurnal aberration.
This was needed to match the AZEL definition in use at the telescope
and definitely needs to stay in AST. You will see that it's not
actually obfuscated and is properly GPL. The confusion here is that
David retained the "Sla" string in the name and it probably should
have been in a separate source file.

I suppose I could tweak the PAL version to match the AST version on
the basis that people have to change the code to use PAL anyhow and
adding a 0 for the aberration would be an easy starting point.

-- 
Tim Jenness