Skip to content

Commit 0fceeeb

Browse files
authored
JOSS review - Hessam comments (#57)
* typos addressed * add installation section * add installation section * capitalize julia to Julia * added plots documentation * added joss status * paper edits * added expfit plot * typo * added references * typo * improved headings * added goals and how to contribute in overview * added why we need inversions * added harminv clarification * added target audience
1 parent 2f818da commit 0fceeeb

19 files changed

+375
-115
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</p>
55

66
[![CI](https://github.com/aris-mav/NMRInversions.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/aris-mav/NMRInversions.jl/actions/workflows/CI.yml)
7-
7+
[![status](https://joss.theoj.org/papers/ad59c8b34ac785bfdff155d4e579a086/status.svg)](https://joss.theoj.org/papers/ad59c8b34ac785bfdff155d4e579a086)
88

99
This package can be used to easily perform numerical inversions for 1D and 2D NMR relaxation and diffusion measurements.
1010

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
34
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
45
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
56
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"

docs/make.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
using Documenter, NMRInversions, GLMakie
22

3+
using DocumenterCitations
4+
5+
bib = CitationBibliography(
6+
joinpath(@__DIR__, "src", "refs.bib");
7+
style=:numeric
8+
)
9+
310
makedocs(sitename="NMRInversions.jl",
411
authors = "Aristarchos Mavridis",
512

@@ -18,7 +25,11 @@ makedocs(sitename="NMRInversions.jl",
1825
"Saving data" => "savefiles.md",
1926
"References" => "references.md"
2027
],
21-
checkdocs=:none
28+
checkdocs=:none,
29+
format = Documenter.HTML(
30+
assets=String["assets/citations.css"],
31+
),
32+
plugins=[bib]
2233
)
2334

2435
deploydocs(

docs/src/assets/1D_gui.png

145 KB
Loading

docs/src/assets/2D_gui.png

150 KB
Loading

docs/src/assets/citations.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.citation dl {
2+
display: grid;
3+
grid-template-columns: max-content auto; }
4+
.citation dt {
5+
grid-column-start: 1; }
6+
.citation dd {
7+
grid-column-start: 2;
8+
margin-bottom: 0.75em; }
9+
.citation ul {
10+
padding: 0 0 2.25em 0;
11+
margin: 0;
12+
list-style: none !important;}
13+
.citation ul li {
14+
text-indent: -2.25em;
15+
margin: 0.33em 0.5em 0.5em 2.25em;}
16+
.citation ol li {
17+
padding-left:0.75em;}
18+

docs/src/assets/exp_fit.png

62.3 KB
Loading

docs/src/assets/multiple_plots.png

248 KB
Loading

docs/src/functions.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
# Functions
21
This page contains the documentation for various useful
32
functions in the NMRInversions package.
43

54
!!! tip
6-
From the julia command line, you can enter '?',
5+
From the Julia command line, you can enter '?',
76
followed by the name of any function, struct,
87
or object you want to learn more about (try it!).
9-
After typing `using NMRInversions` in the julia console,
8+
After typing `using NMRInversions` in the Julia console,
109
this feature will work for all the functions mentioned below.
1110

1211
!!! info
13-
In julia, function definitions look like this:
12+
In Julia, function definitions look like this:
1413
```
1514
foo(x, y, z ; a, b)
1615
```
@@ -41,7 +40,7 @@ functions in the NMRInversions package.
4140
but the name of each argument must be specified.
4241
For more information, please refer to [this link](https://docs.julialang.org/en/v1/manual/functions/).
4342

44-
# Importing data functions
43+
## Importing data
4544
This package offers some functions to import NMR experiment data of various formats.
4645
Alternatively, you can of course import your data however you see fit.
4746
If a format you're working with is not yet supported,
@@ -76,7 +75,7 @@ import_geospec(::String)
7675
```
7776

7877

79-
# Inversion functions
78+
## Inversion
8079
The most important function is `invert()`, which is the main function of the package.
8180
It works as follows:
8281

@@ -85,7 +84,7 @@ invert(::Type{<:pulse_sequence1D}, ::AbstractArray, ::Vector)
8584
invert(::input1D)
8685
```
8786

88-
Due to julia's multiple dispatch,
87+
Due to Julia's multiple dispatch,
8988
it is possible to define a function with the same name
9089
but different arguments, to achieve different results.
9190

@@ -98,7 +97,7 @@ invert(::Type{<:pulse_sequence2D}, ::AbstractVector, ::AbstractVector, ::Abstrac
9897
invert(::input2D)
9998
```
10099

101-
# Finding alpha
100+
## Finding alpha
102101
Here we provide two options for finding the optimal value for alpha,
103102
namely Generalized Cross Validation (GCV) or L-curve.
104103
Generally gcv seems slightly more reliable in NMR, but it's far from
@@ -115,13 +114,13 @@ lcurve(::Real; kwargs...)
115114
lcurve(::Real, ::Real ; kwargs...)
116115
```
117116

118-
The `gcv()` method (from Mithcell 2012) usually involves the least amount of
117+
The `gcv()` method [Mitchell2012](@cite) usually involves the least amount of
119118
function calls and it is thus much faster, thus used as the default option.
120119
If you want more precision, the univariate or box methods should be used instead.
121120
Note that `gcv()` will NOT work for `pdhgm()` solver, so you'll have to choose
122121
an alternative explicitly when using that solver.
123122

124-
# Exponential fit functions
123+
## Exponential fits
125124

126125
For 1D data, we can use the `expfit` function to perform multiexponential fits.
127126
We can use the function by specifying either the number of exponential components,
@@ -139,7 +138,7 @@ it's best to define some starting points close to these.
139138

140139

141140

142-
# Plotting functions
141+
## Plotting
143142

144143
This package offers plotting capabilities, using its GLMakie extension.
145144
Simply use `using GLMakie` before or after `using NMRInversions`
@@ -175,7 +174,7 @@ plot(::NMRInversions.expfit_struct)
175174
plot!(::Union{Makie.Figure,Makie.GridPosition}, ::NMRInversions.expfit_struct )
176175
```
177176

178-
# Miscellaneous functions
177+
## Miscellaneous
179178

180179
Once you have selected some peaks in your inversion results through the GUI,
181180
you might want to extract the weighted averages of these selected peaks,

docs/src/index.md

Lines changed: 36 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,39 @@
1-
Welcome to the NMRInversions.jl package!
1+
Welcome to NMRInversions.jl!
2+
3+
The goal is to provide an easy-to-use interface to process NMR
4+
relaxation and diffusion data, completely free/open-source, and fully
5+
written in Julia.
6+
7+
Functionality includes :
8+
- Importing NMR data from various instrument manufacturers.
9+
- Performing numerical inversions and exponential fits with sensible default settings.
10+
- Interactive visualization of results, through the GLMakie extension.
11+
12+
Who would want to use this package :
13+
- Researchers in chemistry, physics, and materials science who rely on NMR
14+
to study molecular dynamics, diffusion and interactions.
15+
NMRInversions.jl simplifies the process of data analysis, allowing researchers
16+
to focus on their scientific questions rather than the intricacies of data processing.
17+
- Professionals in various fields such as food science, subsurface applications,
18+
or materials engineering can utilize this package to analyze NMR data for quality
19+
control, product development, and research purposes.
20+
- Students learning about NMR techniques can benefit from a straightforward tool
21+
that helps them understand data processing and analysis.
22+
Educators can use the package as a teaching aid in courses related to NMR or
23+
inverse problems.
224

325
Hopefully this documentation will provide all the information you need to get started.
426

5-
!!! info "Installing julia"
6-
You can download the julia programming language by following [this link](https://julialang.org/downloads/).
7-
Afterwards, you can either use the julia console (aka REPL)
8-
by finding the julia .exe file in your computer, or you can use VScode,
9-
which provides an environment similar to MATLAB with the use of the
10-
[julia extension](https://www.julia-vscode.org/)
11-
(follow link for installation instructions).
12-
Of course, if you already have a preferred development workflow
13-
and you know what you're doing, by all means go for it.
14-
15-
!!! info "Installing the package"
16-
The package can be installed by running the following command on the julia console:
17-
```
18-
using Pkg ; Pkg.add("NMRInversions")
19-
```
20-
This usually takes a while, but it needs to be done only once
21-
(unless you swap environment, more on that
22-
[here](https://pkgdocs.julialang.org/v1/environments/)).
23-
24-
Afterwards, you can use the package by running
25-
```
26-
using NMRInversions
27-
```
28-
in your julia console, every time you start a new session.
29-
30-
31-
Whenever a new version comes up, you can run:
32-
```
33-
using Pkg ; Pkg.update("NMRInversions")
34-
```
35-
to update the package.
36-
37-
!!! info "GLMakie extension"
38-
The package provides an extension for interactive visualization,
39-
using the GLMakie package. To gain access to these capabilities,
40-
you also need to install GLMakie:
41-
```
42-
using Pkg ; Pkg.add("GLMakie")
43-
```
44-
And to use it, you need to run
45-
```
46-
using GLMakie
47-
```
48-
in order to access the plotting functions.
49-
50-
51-
For more details on how to use the package, you can start by refering to the [tutorial](tutorial.md) section.
52-
27+
- The [Theory](theory.md) section should provide some info on what the package is really about.
28+
- For more details on how to use it, you can start by refering to the examples in the
29+
[tutorial](tutorial.md).
30+
- To understand how things really work, have a look at the
31+
[Functions](functions.md) and [Types and Structures](types_structs.md) sections.
32+
- If you have any problems or questions, please feel free to
33+
[submit an issue](https://github.com/aris-mav/NMRInversions.jl/issues).
34+
- If you would like to contribute to the package, you may start with one of
35+
the [existing issues](https://github.com/aris-mav/NMRInversions.jl/issues).
36+
Please feel free to create a [pull request](https://docs.github.com/en/pull-requests)
37+
if you'd like to implement a feature, or start a
38+
[discussion](https://github.com/aris-mav/NMRInversions.jl/discussions)
39+
if you're unsure about anything or need further guidance.

0 commit comments

Comments
 (0)