#telescope #astronomy #api-bindings

bin+lib crseo

Cuda Engined Optics Rust Interface

20 unstable releases (7 breaking)

0.9.4 Mar 18, 2024
0.9.0 Jan 27, 2024
0.8.0 Dec 2, 2023
0.7.1 Sep 7, 2023
0.1.0 Dec 17, 2021

#49 in Science

Download history 17/week @ 2024-01-24 9/week @ 2024-02-07 5/week @ 2024-02-14 363/week @ 2024-02-21 60/week @ 2024-02-28 10/week @ 2024-03-06 140/week @ 2024-03-13 35/week @ 2024-03-20 20/week @ 2024-03-27 26/week @ 2024-04-03

223 downloads per month
Used in 4 crates

MIT license

3MB
60K SLoC

Rust 23K SLoC // 0.0% comments C++ 17K SLoC // 0.0% comments CUDA 14K SLoC // 0.1% comments Objective-C 2.5K SLoC Python 2K SLoC // 0.2% comments C 816 SLoC // 0.0% comments VB6 136 SLoC Cython 6 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

~7–19MB
~248K SLoC