Skip to main content

A package for solitonic feature detection in absorption images of Bose-Einstein condensates, with wider use for cold atom image analysis.

Project description

SolDet

SolDet is an object-oriented package for solitonic fearture detection in absorption images of Bose-Einstein condensates, with wider use for cold atom image analysis. It is featured with classifier, object detector, and Mexican hat metric methods. Technical details are explained in https://arxiv.org/abs/2111.04881.

The dataset used to prepare SolDet is currently being prepared for public release. Until then, it can be requested from Justyna Zwolak. Note that SolDet assumes the following folder structure for the data files:

SolDet
|- ...
|- data
    |- data_files
        |- class-0
        |- class-1
        |- ...
        |- class-9
    |- data_info
        |- data_roster.csv
        |- data_roster.npy
|- ...

Installation

(1) (Recommended) Create an Anaconda environment with python 3.7, then activate it

conda create -n SDenv python=3.7
conda activate SDenv

(2) Clone this repository and change directory to it

cd your_directory/SolDet

Replace your_directory with your root directory.

(3) You can install SolDet by running:

python setup.py build  
python setup.py install

Getting started

All features of SolDet are integrated in the SolitonDetector object. To start using SolDet:

from soldet import SolitonDetector
sd = SolitonDetector()

Import data

To import labeled dataset, use load_data method:

sd.load_data(directory='directory_str', data_key={'train':0.9, 'test':0.1}, data_type='labeled') 

To import unlabeled dataset, use

sd.load_data(directory='directory_str', data_key='new', data_type='unlabeled') 

Train models

To train an ML model, use use train_ML method:

sd.train_ML(model_key='object_detector', data_key='train', save=save_str)

where model_key can be 'object_detector' or 'classifier'.

To train the physics-based model, use define_PIE_classifier method:

sd.define_PIE_classifier(data_key='train', save=save_str)

to define a phycics-informed exictiation (PIE) classifier. Use train_quality_estimator method:

sd.train_quality_estimator(data_key='train', save=save_str) 

to train a quality estimator.

Predict and label with pre-trained models

To predict new or test data, use predict method:

pred = sd.predict(data_key='test', model_key=model_key)

where model_key can be 'classifier', 'object_detector', 'PIE_classifier', or 'quality_estimator'.

To filter predicted data with certain criteria, use pipeline method:

checks ={'classifier_labels':[1,2], 
         'object_detector_positions_length':[1,2,3],
         'PIE_types':[0], 
         'quality_estimates_bounds':[0.3,1]}
refined_data = sd.pipeline(data_key='new', new_data_key='refined', checks=checks)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soldet-1.0.0.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soldet-1.0.0-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file soldet-1.0.0.tar.gz.

File metadata

  • Download URL: soldet-1.0.0.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for soldet-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1c22ac02753893baa2cbfdad380374971f716e600f29e0cd59bcc8463c969881
MD5 c107690753d7dd67df8bee74b3d78bc8
BLAKE2b-256 49c2b39daa14b87cd33ff3bb347783cd2a73d4f5b574e6ccd7d91901c29bafc7

See more details on using hashes here.

File details

Details for the file soldet-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: soldet-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for soldet-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0893cbaaa3d66fd9d2bb7b15b79f57b3c75ca2938aca96da32ba55047bbd80d0
MD5 8eb0f5f718b724c71517a00ec3c104a1
BLAKE2b-256 53a3adfc02f98471690fb68035447756c021aa003ae0724aec528a6dcfc78210

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page