This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dataexchange.xtomo.data_xchange as dex | |
import numpy as np | |
data = np.zeros((10,10)) | |
f = dex.DataExchangeFile('text.h5', 'w') | |
# Create initial entry | |
f.add_entry( | |
DataExchangeEntry.data( | |
root='/exchange_1', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I find the best way to use this is to create a fresh virtual environment and go from there. | |
# Record all the packages in the current environment to a txt file | |
pip freeze > requirements.txt | |
# Install all packages in txt file to current environment | |
pip install -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f.add_entry( | |
DataExchangeEntry.data( | |
root='/exchange_1', | |
data={'value': data, 'units':'counts', 'description': 'transmission', 'axes':'theta:y:x' } | |
) | |
) |