Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
COMPASS v5.3 release notes :
Browse files Browse the repository at this point in the history
- **New feature**: User-defined phase screens circular buffer in the telescope. Allows to put a cube of phase screens as an additional input of the telescope.
- **New feature**: Field stop can now be used with SHWFS. Does not simulate flux reduction.
- Modification of the custom DM construction: see the [new tutorial dedicated to this topic](../tutorials/2022-06-09-custom-dm)
- Support for clang compiler
- Fix a bug of the KL basis computation due to the move from MAGMA to CUSOLVER library
- Minor fixes
  • Loading branch information
a-sevin committed Jun 9, 2022
1 parent 4aec197 commit bff88aa
Show file tree
Hide file tree
Showing 79 changed files with 535 additions and 186 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# COMPASS Change logs

- [COMPASS Change logs](#compass-change-logs)
- [Release v5.3.0](#release-v530)
- [Release v5.2.1](#release-v521)
- [Release v5.2](#release-v52)
- [Release v5.1](#release-v51)
Expand All @@ -21,6 +22,15 @@
- [Release v2.0](#release-v20)
- [Release v1.1](#release-v11)

## Release v5.3.0

- **New feature**: User-defined phase screens circular buffer in the telescope. Allows to put a cube of phase screens as an additional input of the telescope.
- **New feature**: Field stop can now be used with SHWFS. Does not simulate flux reduction.
- Modification of the custom DM construction: see the [new tutorial dedicated to this topic](../tutorials/2022-06-09-custom-dm)
- Support for clang compiler
- Fix a bug of the KL basis computation due to the move from MAGMA to CUSOLVER library
- Minor fixes

## Release v5.2.1

COMPASS v5.2.1 release notes :
Expand Down
87 changes: 65 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,93 @@
Table of Contents
=================

* [Requirements](#requirements)
* [Installation de COMPASS via conda](#installation-de-compass-via-conda)
* [Installation de SHESHA package for COMPASS](#installation-de-shesha-package-for-compass)
* [More documentation (maybe not fully up-to-date)](#more-documentation-maybe-not-fully-up-to-date)
* [Questions?](#questions)

Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
- [Table of Contents](#table-of-contents)
- [Requirements](#requirements)
- [Installation of Anaconda/Miniconda](#installation-of-anacondaminiconda)
- [Installation of COMPASS via conda](#installation-of-compass-via-conda)
- [Installation of SHESHA package for COMPASS](#installation-of-shesha-package-for-compass)
- [Test your installation](#test-your-installation)
- [Run the simulation](#run-the-simulation)
- [More documentation (maybe not fully up-to-date)](#more-documentation-maybe-not-fully-up-to-date)
- [Questions?](#questions)

## Requirements

Linux computer with CUDA >= 10.1
- Linux distribution with wget and git installed
- Nvidia GPU card with [CUDA toolkit](https://developer.nvidia.com/cuda-downloads) >= 10.1 (Older versions could be available on request)

## Installation of Anaconda/Miniconda

## Installation de COMPASS via conda
COMPASS binaries, which contain the optimized GPU code, can be installed via Anaconda.
Then, you have to install Anaconda 3 or Miniconda 3 (python 3 is required).

We recommend Miniconda instead of Anaconda as it is much lighter, but it's up to you.

```bash
export CONDA_ROOT=$HOME/miniconda3
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b
export PATH=$HOME/miniconda3/bin:$PATH
conda install -c compass compass -y
bash Miniconda3-latest-Linux-x86_64.sh -b -p $CONDA_ROOT
```

Note: conda main channel is compiled with CUDA 11.3.0, for previous version please use:
Don't forget to add your Miniconda or Anaconda directory to your PATH:

```bash
conda install -c compass/label/cuda113 compass -y # support for compute capability 3.5 – 8.6
conda install -c compass/label/cuda112 compass -y # support for compute capability 3.5 – 8.6
conda install -c compass/label/cuda111 compass -y # support for compute capability 3.5 – 8.6
conda install -c compass/label/cuda110 compass -y # support for compute capability 3.5 – 8.0
conda install -c compass/label/cuda102 compass -y # support for compute capability 3.5 – 7.5
conda install -c compass/label/cuda101 compass -y # support for compute capability 3.5 – 7.5
export PATH=$CONDA_ROOT/bin:$PATH
```

## Installation de SHESHA package for COMPASS
## Installation of COMPASS via conda
Once Miniconda is installed, installing the COMPASS binaries is easy :

```bash
conda install -c compass compass -y
```

**Note**: conda main channel is compiled with CUDA 11.6.0, for previous version please post an issue and will provide it.

This command line will also install dependencies in your conda environment.

## Installation of SHESHA package for COMPASS

First, you will need to set some environment variables:

```bash
cd
git clone https://github.com/ANR-COMPASS/shesha.git
export SHESHA_ROOT=$HOME/shesha
export PYTHONPATH=$SHESHA_ROOT:$PYTHONPATH
export PYTHONDONTWRITEBYTECODE=1
```

Finally, you can get the Shesha package of COMPASS. This python package is the user level of COMPASS. It also contains all the initialization functions.

```bash
git clone https://github.com/ANR-COMPASS/shesha.git $SHESHA_ROOT
```

## Test your installation

Once the installation is complete, verify that everything is working fine :
```bash
cd $SHESHA_ROOT/tests
./checkCompass.sh
```
This test will basically launch fast simulation test cases and it will print if those cases have been correctly initialised.

## Run the simulation

You are ready !
You can try it with one of our paramaters file:

```bash
cd $SHESHA_ROOT
ipython -i shesha/scripts/closed_loop.py data/par/par4bench/scao_sh_16x16_8pix.py
```

And if you want to launch the GUI:

```bash
cd $SHESHA_ROOT
ipython -i shesha/widgets/widget_ao.py
```

## More documentation (maybe not fully up-to-date)

Project GitHub pages with a detailed user manual : https://anr-compass.github.io/compass/
Expand Down
Binary file modified data/dm-data/test_custom_dm.fits
Binary file not shown.
2 changes: 1 addition & 1 deletion shesha/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import subprocess, sys

__version__ = "5.2.1"
__version__ = "5.3.0"

def check_shesha_compass_versions():
compass_package = subprocess.check_output('conda list compass | tail -n1',shell=True).decode(
Expand Down
2 changes: 1 addition & 1 deletion shesha/ao/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.ao
## @brief Python package for AO operations on COMPASS simulation
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/ao/basis.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.ao.basis
## @brief Functions for modal basis (DM basis, KL, Btt, etc...)
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/ao/cmats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.ao.cmats
## @brief Computation implementations of command matrix
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/ao/imats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.ao.imats
## @brief Computation implementations of interaction matrix
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/ao/modopti.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.ao.modopti
## @brief Functions used for modal optimization control
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/ao/tomo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.ao.tomo
## @brief Computation of tomographic reconstructor
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
4 changes: 2 additions & 2 deletions shesha/ao/wfs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.ao.wfs
## @brief On the fly modification of the WFS
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down Expand Up @@ -170,5 +170,5 @@ def comp_new_fstop(wfs: Sensors, n: int, p_wfs: conf.Param_wfs, fssize: float,
# pyr_focmask = np.roll(pyr_focmask,focmask.shape[1]/2,axis=1)
pyr_focmask = focmask * 1.0 # np.fft.fftshift(focmask*1.0)
p_wfs._submask = np.fft.fftshift(pyr_focmask).astype(np.float32)
p_wfs_fssize = fssize
p_wfs._fssize = fssize
wfs.d_wfs[n].set_submask(p_wfs._submask)
2 changes: 1 addition & 1 deletion shesha/config/PATMOS.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PATMOS
## @brief Param_atmos class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/PCENTROIDER.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PCENTROIDER
## @brief Param_centroider class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
28 changes: 23 additions & 5 deletions shesha/config/PCONTROLLER.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PCONTROLLER
## @brief Param_controller class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down Expand Up @@ -114,6 +114,8 @@ def __init__(self):
self.__close_learning_factor = 0.3
""" Autocorrelation learning factor """
self.__close_target = 0.0
""" Update framerate """
self.__close_update_index = 1
""" Target value """
self.__n_iir_in = 0
""" number of input taps to iir filter """
Expand Down Expand Up @@ -615,13 +617,13 @@ def get_lfdownup(self):
"""
return self.__lfdownup

def set_lfdownup(self, qplus, qminus):
def set_lfdownup(self, qminus, qplus):
""" Set the autocorrelation learning factor
:param qplus: (float) : learning factor when higher than target
:param qminus: (float) : learning factor when lower than target
:param qminus: (float) : learning factor when higher than target
:param qplus: (float) : learning factor when lower than target
"""
self.__lfdownup = (csu.enforce_float(qplus), csu.enforce_float(qminus))
self.__lfdownup = (csu.enforce_float(qminus), csu.enforce_float(qplus))

lfdownup = property(get_lfdownup, set_lfdownup)

Expand Down Expand Up @@ -657,6 +659,22 @@ def set_close_target(self, t):

close_target = property(get_close_target, set_close_target)

def get_close_update_index(self):
""" Get the modal gains update rate
:return: (int) : CLOSE update index
"""
return self.__close_update_index

def set_close_update_index(self, idx):
""" Set the modal gains update rate
:param idx: (int) : close update index
"""
self.__close_update_index = csu.enforce_int(idx)

close_update_index = property(get_close_update_index, set_close_update_index)

def get_n_iir_in(self):
""" Get the number of inputs used in iir filter
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/PDMS.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PDMS
## @brief Param_dm class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/PGEOM.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PGEOM
## @brief Param_geom class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/PLOOP.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PLOOP
## @brief Param_loop class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/PTARGET.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PTARGET
## @brief Param_target class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/PTEL.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PTEL
## @brief Param_tel class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/PWFS.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.PWFS
## @brief Param_wfs class definition
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config
## @brief Parameter classes for COMPASS
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/config_setter_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config.config_setter
## @brief Utility functions for enforcing types in a property setter
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/config/pconfig.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.config
## @brief Parameters configuration class
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/constants.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.constants
## @brief Numerical constants for shesha and config enumerations for safe-typing
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
2 changes: 1 addition & 1 deletion shesha/init/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @package shesha.init
## @brief Python package for COMPASS simulation initialization
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @version 5.3.0
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
Expand Down
Loading

0 comments on commit bff88aa

Please sign in to comment.