Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
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
graintracking
DCT
Commits
23347811
Commit
23347811
authored
10 years ago
by
Stefan Schmiederer
Browse files
Options
Downloads
Patches
Plain Diff
Small bugfixes around Taper utils.
Signed-off-by:
Stefan Schmiederer
<
sschmied@esrf.fr
>
parent
bec87c94
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
zUtil_Python/gtPythonCommand.m
+8
-0
8 additions, 0 deletions
zUtil_Python/gtPythonCommand.m
zUtil_Taper/gtTaperReadMapFile.m
+11
-4
11 additions, 4 deletions
zUtil_Taper/gtTaperReadMapFile.m
with
19 additions
and
4 deletions
zUtil_Python/gtPythonCommand.m
+
8
−
0
View file @
23347811
function
[
status
,
msg
,
ver
]
=
gtPythonCommand
(
args
,
use_fable
,
use_exec
)
% GTPYTHONCOMMAND Calls python with the proper command
%
% If your python script can't be found although it should
% be known by the system, try full path and remove trailing
% newline char:
%
% [~, path_to_cmd] = system('which script.py');
% path_to_cmd = path_to_cmd(1:end-1);
%
%
% [status, msg, ver] = gtPythonCommand(args, [use_fable], [use_exec])
% -------------------------------------------------------------------
% INPUT:
...
...
This diff is collapsed.
Click to expand it.
zUtil_Taper/gtTaperReadMapFile.m
+
11
−
4
View file @
23347811
function
grain
=
gtTaperReadMapFile
(
pathtofiles
,
map_file
,
detector_par
)
function
grain
=
gtTaperReadMapFile
(
pathtofiles
,
map_file
,
detector_par
)
% grain = gtTaperReadMapFile(pathtofiles,map_file,detector_par)
if
~
exist
(
pathtofiles
,
'dir'
)
||
isempty
(
pathtofiles
)
...
...
@@ -9,7 +9,7 @@ if ~exist(fullfile(pathtofiles,map_file),'file')
disp
([
'file '
map_file
' does not exist...'
])
return
end
if
~
exist
(
fullfile
(
pathtofiles
,
detector_par
),
'file'
)
if
~
exist
(
fullfile
(
pathtofiles
,
detector_par
),
'file'
)
disp
([
'file '
detector_par
' does not exist...'
])
return
end
...
...
@@ -23,11 +23,18 @@ output_gff = [map_file(1:end-4) '.gff'];
% ... U11 U12 U13 U21 U22 U23 U31 U32 U33
% ... eps11 eps22 eps33 eps23 eps13 eps12
% somehow unix command doesn't search system folders???
[
~
,
pcmd
]
=
system
(
'which ubi_to_gff.py'
);
% unix command adds newline char. Why???
pcmd
=
pcmd
(
1
:
end
-
1
);
disp
(
pcmd
)
cdir
=
pwd
;
cd
(
pathtofiles
);
cmd
=
[
'ubi_to_gff.py '
map_file
' '
detector_par
' '
output_gff
];
[
~
,
msg
]
=
gtPythonCommand
(
cmd
,
true
);
disp
(
msg
)
cmd
=
[
pcmd
' '
map_file
' '
detector_par
' '
output_gff
];
disp
(
cmd
)
[
~
,
msg
]
=
gtPythonCommand
(
cmd
,
true
,
true
);
disp
(
msg
)
fid
=
fopen
(
output_gff
);
C
=
textscan
(
fid
,
'%*d %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f'
,
'Headerlines'
,
1
);
...
...
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