Skip to content

Commit

Permalink
Update readme: instructions for python3.10 and env
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcurbelo committed Sep 24, 2024
1 parent 9b929fd commit 0fd50b0
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 11 deletions.
13 changes: 9 additions & 4 deletions PAPER/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,20 @@ This paper presents an overview of GO-RXR, highlighting its functionality, examp

# Statement of Need

One of the challenges addressed by [@korol_MSc_2023] included the analysis of LaMnO<sub>3</sub>/SrTiO<sub>3</sub> thin-film heterostructures. The data for these samples were collected at the resonant elastic and inelastic x-ray scattering beamline (REIXS) at the Candian Light Source (CLS) in 2017. Although the initial data collection took only three days, attempts to analyze it with the tools available in 2021 yielded little success. In 2023, use of the GO-RXR tool led to a successful analysis, highlighting the efficacy of the software in overcoming longstanding analysis barriers.
RXR offers unique insights into the depth-dependent crystal, electronic, and magnetic structures of quantum materials, enabling the investigation of nanoscale characteristics of new candidate materials with a precision unmatched by any other current experimental technique **[REF - new?]**. Despite its potential, RXR remains significantly underutilized, with far fewer publications compared to techniques such as x-ray absorption spectroscopy. The main challenge hindering the widespread adoption of RXR lies in the extreme difficulty of data analysis, which requires both large-scale computational quantum mechanics simulations and the fitting of reflectivity models with numerous independent variables, such as layer thickness, interfacial roughness, and complex refractive indices that vary with energy. Each of these parameters must be finely adjusted to match the experimental data, making the process intricate and labor-intensive. For example, the oscillations in the Kiessig fringes during theta/two-theta reflectivity scans are directly related to the thickness of the film, while the decay of these fringes indicates the roughness of various interfaces within the material. This makes the analysis process for each sample highly demanding and time-consuming. Consequently, experimental advancements have far outpaced the progress in analytical methods, leaving a substantial amount of collected data unexplored **[REF???]**.

The complexity of RXR analysis extends beyond computational demands, requiring a deep understanding of material properties, such as ferromagnetic order or electronic reconstruction in polar-mismatched heterostructures, and the physics of light-matter interactions, such as energy-dependent absorption edge shifts and dichroism effects. This expertise is pivotal because it provides intuition about parameter adjustments and guides the direction of data analysis to achieve desired outcomes. In addressing this challenge, GO-RXR integrates global optimization algorithms, thereby lowering the expertise threshold necessary for effective data analysis. Through extensive development, diverse global optimization algorithms and unique objective functions were thoroughly explored. The software's capability to capture features in experimental data without exhaustive parameter adjustments significantly reduces the expertise required. It effectively models the oscillations in Kiessig fringes, which are directly linked to film thickness, while preserving the overall shape of the theta/two-theta reflectivity scans using a total variation penalty term. This ensures that both fine details and broader trends in the data are accurately represented. Additionally, GO-RXR offers enhanced flexibility in modeling strain at interfaces by allowing different form factors to be applied to distinct layers within the same element, enabling a more precise depiction of complex interfacial phenomena. GO-RXR serves as a valuable scientific tool for material scientists, offering advanced capabilities to streamline data analysis, reduce the expertise barrier, and ultimately facilitate breakthrough discoveries in the field of materials science.

One notable example is the analysis of LaMnO<sub>3</sub>/SrTiO<sub>3</sub> thin-film heterostructures addressed by [@korol_MSc_2023]. Data collected at the resonant elastic and inelastic x-ray scattering beamline (REIXS) at the Canadian Light Source (CLS) in 2017 had remained unanalyzed despite multiple attempts using available tools in 2021. The data analysis was particularly challenging due to the complex element-specific interactions and the presence of a magnetic dead layer at the surface. The analysis was particularly challenging due to the complex element-specific interactions and the need to model the magnetic dead layer at the interface, which existing tools could not achieve effectively. However, in 2023, the use of GO-RXR enabled a successful analysis, demonstrating the software's efficacy in overcoming longstanding barriers and highlighting its impact on advancing RXR studies.

The analysis of RXR presents multifaceted challenges, extending beyond computational aspects to encompass expertise in materials and the physics of light-matter interactions. This expertise is pivotal because it provides intuition about parameter adjustments and guides the direction of data analysis to achieve desired outcomes. In addressing this challenge, GO-RXR integrates global optimization algorithms, thereby lowering the expertise threshold necessary for effective data analysis. Through the extensive development of GO-RXR, diverse global optimization algorithms and unique objective functions were thoroughly explored. The software's capability to capture features in experimental data without exhaustive parameter understanding significantly reduces the expertise required. GO-RXR serves as a valuable scientific tool for material scientists, offering advanced capabilities to streamline data analysis and reduce the expertise barrier, ultimately facilitating breakthrough discoveries in the field of materials science.

# Comparison

To the best of our knowledge, no existing software tool comprehensively addresses the general problem of RXR data analysis across a wide range of materials and conditions. Most of the currently available tools are designed for very specific tasks and cannot be extensively applied to the diverse challenges encountered in RXR studies. For example, tools like GenX [@bjorck2007_genx] and Motofit [@nelson2006_motofit] are widely used for reflectometry but are primarily focused on specific types of reflectivity data analysis, such as neutron or x-ray reflectometry, without the capability to handle the complex, element-specific interactions in RXR. Similarly, more modern tools like Refl1D [@refl1d_github] and BornAgain [@pospelov2020_bornagain] offer powerful features for modeling and fitting specific types of reflectometry data but still lack the flexibility and comprehensive approach needed for the broad range of challenges in RXR analysis.
To the best of our knowledge, no existing software tool comprehensively addresses the general problem of RXR data analysis across a wide range of materials and conditions. Most of the currently available tools are designed for very specific tasks and cannot be extensively applied to the diverse challenges encountered in RXR studies. For instance, tools like GenX [@bjorck2007_genx] and Motofit [@nelson2006_motofit], while effective for neutron and non-resonant x-ray reflectometry, lack the capability to model key aspects of RXR data, such as magnetic scattering contributions and energy-dependent changes in refractive indices, which are critical for interpreting element-specific interactions in complex material. Similarly, more modern tools like Refl1D [@refl1d_github] and BornAgain [@pospelov2020_bornagain] offer powerful features for modeling and fitting specific types of reflectometry data but still lack the flexibility and comprehensive approach needed for the broad range of challenges in RXR analysis.

GO-RXR was developed to fill this gap by providing a comprehensive tool for RXR data analysis. It incorporates advanced global optimization algorithms that efficiently handle the high dimensionality and complexity of RXR datasets, avoiding common issues like local minima. GO-RXR’s ability to customize objective functions and integrate fitting techniques, such as total variation penalty methods, enables accurate modeling of complex electronic and magnetic structures in thin films. This makes it uniquely suited for a broad range of material systems and experimental conditions **[examples here]**.

The development of GO-RXR is a response to the critical need for improved tools to analyze RXR data effectively. GO-RXR distinguishes itself from existing RXR data analysis tools through its comprehensive approach and user-friendly design. GO-RXR offers a graphical user interface (GUI) and intuitive plotting options, facilitating data interpretation and analysis. Furthermore, GO-RXR incorporates state-of-the-art global optimization algorithms, allowing for faster and more accurate data fitting compared to older methods. Its ability to model thin-film materials and customize objective functions makes it a versatile and valuable tool for researchers in the field of material science.
Additionally, GO-RXR features a user-friendly graphical interface with intuitive plotting options, enhancing data interpretation and visualization. This combination of advanced analytical capabilities and accessibility bridges the gap between experimental data collection and theoretical modeling, offering researchers a powerful tool for studying complex material systems in RXR.

# Functionality

Expand Down
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

# Getting Started

## Linux (this is the recommended configuration)
## Linux (Recommended Configuration)

Tested on Ubuntu 22.04

Expand All @@ -56,21 +56,52 @@ $ git clone https://github.com/lucaskorol21/GO-RXR.git

#### 2. Prerequisites and Setup (Tested with Python 3.10.14)

1. **Set Up the Virtual Environment**
2.0. **Ensure Python 3.10 is Installed (Recommended Version)**

Before setting up the virtual environment, make sure Python 3.10 is installed on your system:
```bash
$ python3.10 --version
```

If Python 3.10 is installed, you should see an output like ```Python 3.10.x```. If not, follow the steps below to install it.

- **Install Python 3.10:**

Run the following commands to install Python 3.10 on Ubuntu:
```bash
$ sudo apt update
$ sudo apt install python3.10 python3.10-venv python3.10-dev
```

- **Verify the Installation:**

```bash
$ python3.10 --version
```

This should confirm that Python 3.10 is installed correctly.

2.1. **Set Up the Virtual Environment**


- **Navigate to the `GO-RXR` Directory**:
```bash
$ cd GO-RXR
```

- **Create the virtual environment**:
Inside the `GO-RXR` directory:
```bash
$ virtualenv -p python3.10 venv-go-rxr
```

```bash
$ virtualenv -p python3.10 venv-go-rxr
```

- **Activate the virtual environment**:
Activate the virtual environment directory:
```bash
(venv-go-rxr) $ source venv-go-rxr/bin/activate
```

2. **Install Package Dependencies**
2.2. **Install Package Dependencies**

Install the required Python packages using `pip`:

Expand Down

0 comments on commit 0fd50b0

Please sign in to comment.