#telescope #astronomy #api-bindings

bin+lib crseo

Cuda Engined Optics Rust Interface

24 releases (4 stable)

1.0.3 Oct 25, 2024
0.9.4 Mar 18, 2024
0.8.0 Dec 2, 2023
0.7.1 Sep 7, 2023
0.1.0 Dec 17, 2021

#53 in Science

Download history 7/week @ 2024-09-21 18/week @ 2024-09-28 177/week @ 2024-10-05 342/week @ 2024-10-12 79/week @ 2024-10-19 56/week @ 2024-10-26 48/week @ 2024-11-02 3/week @ 2024-11-09 6/week @ 2024-11-16 3/week @ 2024-11-23

61 downloads per month
Used in 5 crates

MIT license

4.5MB
35K SLoC

Rust 24K SLoC // 0.1% comments Objective-C 5K SLoC Python 4K SLoC // 0.2% comments C 1.5K SLoC // 0.1% comments VB6 273 SLoC C++ 133 SLoC // 0.2% comments Cython 13 SLoC

CRSEO: Cuda Engined Optics Rust Wrapper

Installation

  1. CEO install

Install CUDA and Noweb, then

git clone -b rust https://github.com/rconan/ceo.git
cd ceo
make all
sudo make install
cd ..
  1. GMT M1 and M2 modes
mkdir data
cd data
wget https://s3.us-west-2.amazonaws.com/gmto.modeling/ceo-modes.tar
tar xvf ceo-modes.tar
export GMT_MODES_PATH=`pwd`
cd ..
  1. Install Clang

lib.rs:

CEO wrapper crate

The CEO wrapper is the interface to CEO CUDA API. CEO elements are created using the builder associated to each element.

For example, the default CEO elements Gmt and Source are built with:

use crseo::ceo;
let mut gmt = ceo!(Gmt);
let mut src = ceo!(Source);
src.through(&mut gmt).xpupil();
println!("WFE RMS: {:?}nm",src.wfe_rms_10e(-9));

ceo! is a macro that incorporates the necessary boilerplate code to create CEO elements.

Dependencies

~9–19MB
~270K SLoC