Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SPINS_main
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Donovan Allum
SPINS_main
Commits
d388463e
Commit
d388463e
authored
3 years ago
by
kar
Browse files
Options
Downloads
Patches
Plain Diff
fixed small bug in matlab script for QSP
parent
6f889ed8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/spins_QSP_csv.m
+12
-8
12 additions, 8 deletions
matlab/spins_QSP_csv.m
with
12 additions
and
8 deletions
matlab/spins_QSP_csv.m
+
12
−
8
View file @
d388463e
function
[
T1_max
,
T1_min
,
S1_max
,
S1_min
,
pdfCount
]
=
spins_QSP_reader
(
filename
)
% Reads in the csv file and interprets it in the correct way for the user.
%
% Input: Filename (string) name of csv file.
%
% Output: Returns the max/min values for T1 and S1 (as specified in
% spins.conf) and the (normalized) pdfCount histogram.
function
[
T1_max
,
T1_min
,
S1_max
,
S1_min
,
pdfCount
]
=
spins_QSP_csv
(
filename
)
%% Reads in the csv file and interprets it in the correct way for the user.
%%
%% Input:
%% Filename (string): name of csv file.
%%
%% Output:
%% T1_max (float): upper limit of the maximum-valued bin of T1 tracer
%% T1_min (float): lower limit of the minimum-valued bin of T1 tracer
%% S1_max (float): upper limit of the maximum-valued bin of S1 tracer
%% S1_min (float): lower limit of the minimum-valued bin of S1 tracer
A
=
importdata
(
filename
);
T1_max
=
A
(
1
,
1
);
T1_min
=
A
(
1
,
2
);
S1_max
=
A
(
1
,
3
);
S1_min
=
A
(
1
,
4
);
pdfCount
=
A
(
2
:
end
,
:);
pdfCount
/
=
sum
(
sum
(
pdfCount
));
pdfCount
=
pdfCount
/
sum
(
sum
(
pdfCount
));
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment