README.md 2.92 KB
Newer Older
1
# ARIANE -- ARtificial Intelligence-Assisted Neutron Experiments
2
3
4

ARIANE is a Python application assisting neutron experiments by determining informative measurement locations.
It exploits log-[Gaussian processes](https://gaussianprocess.org/gpml/) for an [active learning](https://en.wikipedia.org/wiki/Active_learning_(machine_learning)) approach and operates as a server application.
Mario Teixeira Parente's avatar
Mario Teixeira Parente committed
5
For running its code, ARIANE requires _Python 3.7+_ and libraries from `requirements.txt`.
Mario Teixeira Parente's avatar
Mario Teixeira Parente committed
6
7
The underlying methodology is described in [arXiv:2209.00980](https://arxiv.org/abs/2209.00980).
<!-- Update journal reference once paper is accepted.-->
8
9

Each application of ARIANE has a dedicated code structure in `ariane/app/` using functionalities from `ariane/lib/`.
10
Log files stored in `logs/` can be investigated with tools from `diagnostics/app/`.
11
12
13
14
15
16
Software tests are available at `tests/app/`.

## Applications
### Three-axes spectroscopy (TAS)
Functionalities for TAS can be found at `ariane/app/tas/`.
The network protocol used for the communication between the TAS server and a client is documented in the TeX file `doc/protocol_tas.tex`.
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
The following steps show a common workflow.

1. **Start TAS server**

    The TAS server can be started by running `bin/ariane-tas-server`.
    For the list of optional arguments, use `-h` or `--help`.
    The server binds a socket at the specified TCP port for the connection with a client.
    The default port is `11657` (see `PORT_DEFAULT` in `ariane/app/tas/server/_server.py`).
    A log file (`YYYY-MM-DD_hh:mm:ss_ariane_server.log`) is created at `logs/` and expanded during runtime.
    
2. **Start an experiment**

    For starting an experiment, a client needs to connect to the server and follow the communication protocol.
    First, the client needs to initialize the server.
    If done correctly, the server can provide informative measurement locations to the client who gives collected (detector and monitor) counts back to the server.
    After the client stops the experiment, a log file with all corresponding information is created at `logs/` (`ariane_YYYY-MM-DD_hh:mm:ss_2_final.json`, the time stamp is set to the start time of the experiment).

    Temporary log files, in order to avoid potential data loss, are also placed at `logs/`: `ariane_YYYY-MM-DD_hh:mm:ss_0_init.json` (after initialization) and `ariane_YYYY-MM-DD_hh:mm:ss_1_interm.json` (after each new measurement point).

3. **Diagnose experiment**

    Diagnostics after an experiment can be performed by running `bin/tas-diagnostics`.
    The different options are listed in `diagnostics/app/tas/run.py` (by default, all options are commented out, i.e., disabled).
    By default, the script uses the log file of the last experiment.
    For using a particular log file, `filename` needs to be changed accordingly.

4. **Start a new experiment**

    Repeat steps `3` and `4` with or without restarting the server.
    If the server is restarted, it creates a new log file.