#astronomy #telescope #api-bindings

bin+lib crseo

Cuda Engined Optics Rust Interface

30 releases (10 stable)

2.3.2 Mar 13, 2025
2.2.0 Feb 14, 2025
1.0.5 Jan 14, 2025
1.0.3 Oct 25, 2024
0.1.0 Dec 17, 2021

#8 in Simulation

Download history 5/week @ 2024-12-04 6/week @ 2024-12-11 1/week @ 2024-12-18 51/week @ 2025-01-08 60/week @ 2025-01-15 19/week @ 2025-02-05 259/week @ 2025-02-12 22/week @ 2025-02-19 16/week @ 2025-02-26 81/week @ 2025-03-05 326/week @ 2025-03-12

457 downloads per month
Used in 5 crates

MIT license

4.5MB
30K SLoC

Rust 19K 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
~268K SLoC