Skip to content

dfulla/CanSAS_dfm

Repository files navigation

CanSAS_dfm

Files (python):

  1. SAS_CanSAS.py
  2. Extracts Qx,Qy and I(Qx,Qy) from two files.
  3. Extracts metadata from the name of the two files (magnetic field value).
  4. Creates an h5 file. Inputs attributes (qi, indexes, name_of_sample etc).
  5. Inputs the data from the two files into the h5 file following the CanSAS format.
  6. Closes the h5 file which is then ready to be read.
  7. open_tables.py
  8. Opens an h5 (or hdf5) file and prints the structure (groups, datasets, size of arrays, etc).
  9. open_h5.py
  10. Opens an h5 (or hdf5) file and returns a dictionary with the data contained in the file.
  11. whats_in_dic.py
  12. Prints the contain of the dictionary returned from the open_h5.py.
  13. plot_3d_sas.py
  14. 3D plot of I(Qx,Qz) vs Qx,Qz from one *.ABS file
  15. Includes another method to plot both files simultaneously for comparison.
  16. plot_3d_from2files.py
  17. Makes 2 plots in 3D from the 2 intensity arrays from the h5 file.

How to run the scripts

  1. SAS_CanSAS.py
  2. option 1: 1. python SAS_CanSAS.py 2. the program prints the files .ABS files available 3. user may copy/paste a combination of two files 4. h5 file is created with data from the .ABS files
  3. option 2: 1. python SAS_CanSAS.py file1.ABS file2.ABS 2. file1 and file2 need to belong to the same sample. It will be verified. 3. h5 file is created with data from the .ABS files
  4. open_tables.py
    1. option 1:
    2. python open_tables
    3. Displays the h5 and/or hdf5 files available
    4. User copy/pastes one file
    5. Prints the structure of the h5 file (groups, datasets, array dimensions etc)
    6. option 2:
    7. python file.h5
    8. prints the structure of the h5 file (groups, datasets, array dimensions etc)
  5. open_h5.py
    1. option 1:
    2. python open_h5.py
    3. user gets files available from the program
    4. user select one file
    5. program creates a dictionary
    6. option 2:
    7. python open_h5.py file.h5
    8. program creates a dictionary

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages