#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

#35 in Science

Download history 5/week @ 2024-09-20 17/week @ 2024-09-27 3/week @ 2024-10-04 497/week @ 2024-10-11 45/week @ 2024-10-18 111/week @ 2024-10-25 38/week @ 2024-11-01 14/week @ 2024-11-08 3/week @ 2024-11-15

167 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

~8–19MB
~262K SLoC