#telescope #astronomy

bin+lib crseo

Cuda Engined Optics Rust Interface

17 releases (7 breaking)

0.9.1 Feb 9, 2024
0.8.0 Dec 2, 2023
0.7.1 Sep 7, 2023
0.6.2 May 18, 2023
0.1.0 Dec 17, 2021

#168 in Science

Download history 33/week @ 2023-10-26 12/week @ 2023-11-02 26/week @ 2023-11-09 13/week @ 2023-11-16 45/week @ 2023-11-23 82/week @ 2023-11-30 15/week @ 2023-12-07 26/week @ 2023-12-14 47/week @ 2023-12-21 6/week @ 2023-12-28 27/week @ 2024-01-04 10/week @ 2024-01-11 15/week @ 2024-01-18 88/week @ 2024-01-25 42/week @ 2024-02-01 88/week @ 2024-02-08

236 downloads per month
Used in 3 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 R 297 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 ceo::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
~250K SLoC