#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

#38 in Science

Download history 1/week @ 2024-07-23 2/week @ 2024-07-30 1/week @ 2024-09-17 18/week @ 2024-09-24 6/week @ 2024-10-01 330/week @ 2024-10-08 209/week @ 2024-10-15 107/week @ 2024-10-22 24/week @ 2024-10-29 35/week @ 2024-11-05

403 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
~265K SLoC