-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from DeepanshS/v0.1.1merge_restructure
V0.1.1merge restructure: Using OpenBlas libraries
- Loading branch information
Showing
120 changed files
with
7,050 additions
and
2,725 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[flake8] | ||
ignore = E741, C901, W503, F401, F841, F811 | ||
exclude = .eggs,*.egg,build | ||
filename = *.pyx,*.px*, *py | ||
max-line-length = 88 | ||
max-complexity = 18 | ||
select = B,C,E,F,W,T4,B9 | ||
|
||
|
||
## E203, E266, E501, F403 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: all | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
version: 3.7 | ||
install: | ||
- requirements: docs/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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
include README.md | ||
include src/c_lib/lib/*.c | ||
include src/c_lib/mrmethods/*.c | ||
include src/c_lib/include/*.* | ||
include src/c_lib/test/*.* | ||
|
||
recursive-include src/mrsimulator/examples * | ||
include src/mrsimulator/isotope_data.json |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from mrsimulator.miscellaneous import read_dmfit_files | ||
import matplotlib.pyplot as plt | ||
from mrsimulator.python.simulator import simulator | ||
from mrsimulator import Simulator | ||
import numpy as np | ||
|
||
|
||
def _dmfit(): | ||
file_address = '/Users/deepansh/Documents/CSA_20kHz_0.1.txt' | ||
|
||
freq, amp = read_dmfit_files(file_address) | ||
max_amp = amp.max() | ||
freq_at_max = freq[np.argmax(amp)] | ||
print(freq_at_max, max_amp) | ||
|
||
spectrum = { | ||
"direct_dimension": { | ||
"magnetic_flux_density": "9.4 T", | ||
"rotor_frequency": "0 kHz", | ||
"rotor_angle": "54.735 deg", | ||
"number_of_points": 2048, | ||
"spectral_width": "100 kHz", | ||
"reference_offset": "0 kHz", | ||
"isotope": "1H", | ||
} | ||
} | ||
isotopomers = [ | ||
{ | ||
"sites": [ | ||
{ | ||
"isotope": "1H", | ||
"isotropic_chemical_shift": "0 Hz", | ||
"shielding_symmetric": {"anisotropy": "20 kHz", "asymmetry": 0.1}, | ||
}, | ||
] | ||
} | ||
] | ||
sp = Simulator() | ||
sp.isotopomers = isotopomers | ||
sp.spectrum = spectrum | ||
f, a = simulator(isotopomers=sp._isotopomers_c, spectrum=sp._spectrum_c) | ||
fig, ax = plt.subplots(2, 1) | ||
ax[0].plot(freq, amp / amp.max(), 'r', label='dmfit') | ||
ax[0].plot(f, a / a.max(), 'k', label='mrsimulator') | ||
ax[0].legend() | ||
ax[1].plot(f, (amp / amp.max())[::4] - a / a.max()) | ||
plt.show() | ||
|
||
|
||
if __name__ == '__main__': | ||
_dmfit() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in | ||
# documentation are documented, even if no documentation was available. | ||
# Private class members and static file members will be hidden unless | ||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES | ||
|
||
EXTRACT_ALL = No | ||
|
||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class | ||
# will be included in the documentation. | ||
|
||
EXTRACT_PRIVATE = No | ||
|
||
# If the EXTRACT_STATIC tag is set to YES all static members of a file | ||
# will be included in the documentation. | ||
|
||
EXTRACT_STATIC = YES | ||
|
||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) | ||
# defined locally in source files will be included in the documentation. | ||
# If set to NO only classes defined in header files are included. | ||
|
||
EXTRACT_LOCAL_CLASSES = YES | ||
|
||
# This flag is only useful for Objective-C code. When set to YES local | ||
# methods, which are defined in the implementation section but not in | ||
# the interface are included in the documentation. | ||
# If set to NO (the default) only methods in the interface are included. | ||
|
||
EXTRACT_LOCAL_METHODS = YES | ||
|
||
# If this flag is set to YES, the members of anonymous namespaces will be | ||
# extracted and appear in the documentation as a namespace called | ||
# 'anonymous_namespace{file}', where file will be replaced with the base | ||
# name of the file that contains the anonymous namespace. By default | ||
# anonymous namespace are hidden. | ||
|
||
EXTRACT_ANON_NSPACES = NO | ||
|
||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all | ||
# undocumented members of documented classes, files or namespaces. | ||
# If set to NO (the default) these members will be included in the | ||
# various overviews, but no documentation section is generated. | ||
# This option has no effect if EXTRACT_ALL is enabled. | ||
|
||
HIDE_UNDOC_MEMBERS = NO | ||
|
||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all | ||
# undocumented classes that are normally visible in the class hierarchy. | ||
# If set to NO (the default) these classes will be included in the various | ||
# overviews. This option has no effect if EXTRACT_ALL is enabled. | ||
|
||
HIDE_UNDOC_CLASSES = NO | ||
|
||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all | ||
# friend (class|struct|union) declarations. | ||
# If set to NO (the default) these declarations will be included in the | ||
# documentation. | ||
|
||
HIDE_FRIEND_COMPOUNDS = NO |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.