Skip to content
  • Ludwig Schwardt's avatar
    78a032d5
    Turn AlmaCalc11 into a Python package · 78a032d5
    Ludwig Schwardt authored
    This will become almacalc 11.0.0. Use f2py to generate a portable
    Fortran extension which takes care of type checks and conversions
    (unlike ctypes). We are using f2py's "smart way" to wrap the main
    almacalc function, by generating a signature file (calc11.pyf) and
    tweaking it to suit our interface.
    
    Attempt a minimal packaging setup with careful attention to setup.py
    and the rest of the packaging infrastructure (no cargo!).
    
    Write a NumPy-based wrapper for the main almacalc function that takes
    care of optional and unused arguments and also finds the builtin JPL
    ephemeris file that is installed as package data (if none is provided).
    The ephemeris is minimally checked to avoid a nasty Fortran crash.
    
    Add a basic test that can be run via pytest. Generate the expected
    output using a Makefile that builds a Fortran test program.
    
    The license is still up for discussion. CALC has been around since at
    least 1977 and is considered to be in the public domain by David Gordon,
    who has also been the main author of changes since 1988, when it became
    necessary to obtain permission from copyright holders to release
    software into the public domain. Mark Ashdown and Ludwig Schwardt's code
    falls under 3-clause BSD, while the ALMA repository is mostly LGPL.
    Another license contender is Zero-Clause BSD, which is effectively
    public domain.
    
    Surprisingly, this all works in Python 2.7 with hardly any deviation
    from Python 3 idioms, so we might as well support it (for now).
    78a032d5
    Turn AlmaCalc11 into a Python package
    Ludwig Schwardt authored
    This will become almacalc 11.0.0. Use f2py to generate a portable
    Fortran extension which takes care of type checks and conversions
    (unlike ctypes). We are using f2py's "smart way" to wrap the main
    almacalc function, by generating a signature file (calc11.pyf) and
    tweaking it to suit our interface.
    
    Attempt a minimal packaging setup with careful attention to setup.py
    and the rest of the packaging infrastructure (no cargo!).
    
    Write a NumPy-based wrapper for the main almacalc function that takes
    care of optional and unused arguments and also finds the builtin JPL
    ephemeris file that is installed as package data (if none is provided).
    The ephemeris is minimally checked to avoid a nasty Fortran crash.
    
    Add a basic test that can be run via pytest. Generate the expected
    output using a Makefile that builds a Fortran test program.
    
    The license is still up for discussion. CALC has been around since at
    least 1977 and is considered to be in the public domain by David Gordon,
    who has also been the main author of changes since 1988, when it became
    necessary to obtain permission from copyright holders to release
    software into the public domain. Mark Ashdown and Ludwig Schwardt's code
    falls under 3-clause BSD, while the ALMA repository is mostly LGPL.
    Another license contender is Zero-Clause BSD, which is effectively
    public domain.
    
    Surprisingly, this all works in Python 2.7 with hardly any deviation
    from Python 3 idioms, so we might as well support it (for now).
This project is licensed under the BSD 3-Clause "New" or "Revised" License. Learn more
Loading