Skip to main content

ALS.Milo (version 0.18)

Overview

Milo is a suite of Python modules used to read, process, and analyze data that was collected on the Scattering Chamber located at Beamline 4.0.2 (a.k.a. BL402) of the Advanced Light Source (Berkeley, CA USA).

It is distributed under the namespace package, ALS.

How to cite this software

If you use this software in your research, please include the following citation in your publication:

Installation

Install from PyPI

ALS.Milo can be installed from PyPI using pip. The following example shows how.

>> sudo python -m pip install ALS.Milo -vv

Install from Anaconda

ALS.Milo can be installed from Anaconda Cloud. The following example shows how.

>> conda config --add channels padraicshafer    # Required for ALS.Milo
>> conda config --add channels pshafer  # Required for dependency
>> conda install ALS.Milo

Install from local repository (download)

ALS.Milo can be installed from a local copy of the project repository using pip. The following example shows how.

>> cd ALS.Milo-0.18.1/  # Local directory of project repository
>> sudo pip install .

Background information

Data from the BL402 Scattering Chamber is stored in two types of files:

  • FITS files: Each image captured by the CCD (a.k.a. the camera) is stored in a separate file using the FITS format. More details below. https://fits.gsfc.nasa.gov/fits_documentation.html

  • Scan summary files: When a scan sequence is run to collect data, a text file is created to summarize the parameters of the scan and the data collected.

    Every scan summary file contains a header that describes the scan and the types of data recorded, followed by data rows -- one row per data point. An Instrument Scan provides an image filename in each data row that can be used to access the CCD images recorded during the scan.

Usage

class CcdImageFromFITS encapsulates the operations of loading CCD data from a FITS file (including header information), accessing that data, and converting CCD screen coordinates (pixels) into reciprocal space coordinates.

The following command can be used to access the CcdImageFromFITS class in the qimage module.

from als.milo.qimage import CcdImageFromFITS

To read a FITS file use the constructor:
CcdImageFromFITS(filename) ,
where filename is a reachable (relative or absolute) file path to the FITS file.

The two-dimensional array of data can be accessed through the instance member, data.

ccd_image = CcdImageFromFITS("NiFe_8044-00024.fits")
ccd_image.data  # 2D array with shape (num_rows, num_columns)

Reciprocal space coordinates are calculated for each pixel using the member function, qvalues_df(). The return value is a PANDAS dataframe (df) where each row corresponds to a single pixel. The columns ["Qx", "Qy", "Qz"] are the diffractometer coordinates of the reciprocal space vector in units of nm-1 (Q = 2π / d). Intensity of each pixel is in column, "Counts".

ccd_image = CcdImageFromFITS("NiFe_8044-00024.fits")
q_ccd_df = ccd_image.qvalues_df()
q_ccd_df["Qx", "Qy", "Qz", "Counts"]    # CCD data in reciprocal space

Copyright Notice

ALS.Milo: BL402 RSXD Data Analysis, Copyright (c) 2014-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at IPO@lbl.gov.

NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit other to do so.

Metadata

Release files for ALS.Milo 0.18.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ALS.Milo 0.18.1
File Size Uploaded
ALS.Milo-0.18.1.tar.gz 53.1 kB Details

Release files / ALS.Milo-0.18.1.tar.gz

Download URL ALS.Milo-0.18.1.tar.gz
Size 53.1 kB
Tags Source
SHA-256 checksum
How to use checksums
816a5a68a2bb53973e36b06a1d8e3767681382544875de8c1e1f4d02a834e1e9
BLAKE2b-256 checksum
How to use checksums
39e2db3fded586eb3b400cfb46d87d8798c82a1d363d250a7ff3c90ed031bab6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.18

Release history Release notifications | RSS feed

This release

0.18.1 This release

1 release file

0.18.0

1 release file

0.17.1

1 release file

0.16.0

1 release file

0.15.4

1 release file

0.15.3

1 release file

0.15.1

1 release file

0.15.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page