Addition Information for Python insiders
This additional information on the class and its functions and not needed if you completed the previous step in the tutorial.
Step-by-step Python tutorial
For you to call and use the ProcessMRXS Python class via Python script, this is the step-by-step tutorial:
Clone or download this repository to your local machine/laptop.
Import the
processMRXSDataclass into your Python script.
from process_mrxs_data import ProcessMRXSDataCreate an instance of the ProcessMRXSData class by providing paths to your MRXS files in a specific directory and inventory file, as well as the other files necessary to launch the call.
mrxs_directory = "path/to/your/mrxs_files"
inventory_file = "path/to/your/inventory.csv"
output_path = "path/to/your/directory/to/outputs"
output_extension="xlsx/csv"
#(should choose one of the extension)
processor = ProcessMRXSData.process_directory(mrxs_directory, inventory_file, output_path, output_extension)Call the other functions for the rate calculation and relative images:
#Remember to define the output_filename as ENV
# EXPORT output_filename="whatever/name"
rate = ProcessMRXSData.process_rate(output_path, output_filename)
for file in rate:
ProcessMRXSData.process_heatmaps(rate)
ProcessMRXSData.process_scatterplots(rate)Check the output images in the output_path
Example of workflow_template script:
In a new file with the extension .py, you should write:
Using this standard file and calling via command line, you should haver in the same directory the resulting file and scatterplots.
Just in case:
You can call your Python script template.py on the terminal with this command:
Or:
Last updated