Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ build
jandata
classconverter
classdata
discos2class.egg-info/
src/__init__.py.bak
src/discosscan.py.bak
gui/scan_cycle.txt
*.bak
dist/
build/
Expand Down
90 changes: 86 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,89 @@
# discos2class
# discos2class - GUI Mode

This section describes how to run the graphical user interface (GUI) of the software.

---

## Requirements

- Python **>= 3.10,< 3.13** (tested with **3.11.8**)
- Dependencies listed in `requirements.txt`

---

## Installation

Create a virtual environment and install the required dependencies.

### Linux / macOS

```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

### Windows (Git Bash)

```bash
python -m venv venv
source venv/Scripts/activate
pip install -r requirements.txt
```

## Running the GUI

From the **root directory of the project**, run:

```bash
python -m gui.d2c_gui_loader_v2_0

Important: do not run the file directly.
The GUI must be executed as a Python module using the -m option.
```

### Configuration file (`config.ini`)

The application relies on the `config.ini` file to define the available data backends.
This file **must be configured properly** in order for the application to work as expected.

Each backend is defined using three parallel lists:

- `labels`: names shown in the GUI ComboBox
- `paths`: filesystem paths where the data is stored
- `ips`: IP addresses of the servers hosting the data

All lists **must have the same number of elements** and be **index-aligned**.
The same index across the three lists refers to the same backend.

Example:

```ini
[Drives]
labels = Backend A, Backend B
paths = /mnt/data_a, /mnt/data_b
ips = 192.168.1.10, 192.168.1.20
```

#### Runtime checks

At runtime, the application performs the following checks for the selected backend:

1. Verifies that the selected server (IP) is reachable.
2. Verifies that the corresponding filesystem path exists and is correctly mounted.
3. Proceeds with data analysis **only if** the drive is accessible.

An incorrect or inconsistent configuration (for example mismatched list lengths,
invalid paths, or unreachable servers) may prevent the application from accessing
the data.




# discos2class - Command-Line Mode

**discos2class** command line tool used to
convert DISCOS spectroscopy files acquired with XARCOS into CLASS native format.
convert DISCOS spectroscopy files acquired with XARCOS, SARDARA and SKARAB into CLASS native format.

##TOC

Expand Down Expand Up @@ -203,7 +285,7 @@ compute the resulting spectrum as:

##Requirements

The software is developed in Python, using python2.7, and it depends on
The software is developed in Python, using python3.11, and it depends on
external python packages:

* astropy
Expand All @@ -222,7 +304,7 @@ The command line tool can be installed via:
$ python setup.py install
```

Tested with Python 3.11.8
Tested with Python 3.11



Expand Down
Empty file added gui/__init__.py
Empty file.
6 changes: 4 additions & 2 deletions gui/config.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[Paths]
path = /roach2_nuraghe/data/,/discos-archive/data/
[DRIVES]
labels = SARDARA_BKD,SKARAB_BKD
paths = /roach2_nuraghe/data/,/discos-archive/data/
ips = 192.168.1.10,192.168.1.20

Loading