Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Superflat_scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OPTIQUE
LEAPS
Superflat_scripts
Commits
109e204e
Commit
109e204e
authored
Oct 25, 2023
by
Francois POLACK
Browse files
Options
Downloads
Patches
Plain Diff
fix: bug in writing @axes attribute of NXdata groups
parent
0b87eb18
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
heightmap.py
+4
-4
4 additions, 4 deletions
heightmap.py
with
4 additions
and
4 deletions
heightmap.py
+
4
−
4
View file @
109e204e
...
@@ -799,7 +799,7 @@ class HeightMap(object):
...
@@ -799,7 +799,7 @@ class HeightMap(object):
yraw
=
np
.
linspace
(
-
origin_y
*
ypix
,(
self
.
rawZ
.
shape
[
0
]
-
origin_y
)
*
ypix
,
num
=
self
.
rawZ
.
shape
[
0
],
endpoint
=
False
)
yraw
=
np
.
linspace
(
-
origin_y
*
ypix
,(
self
.
rawZ
.
shape
[
0
]
-
origin_y
)
*
ypix
,
num
=
self
.
rawZ
.
shape
[
0
],
endpoint
=
False
)
x
=
nx
.
NXfield
(
xraw
,
name
=
'
x
'
,
unit
=
'
meter
'
)
x
=
nx
.
NXfield
(
xraw
,
name
=
'
x
'
,
unit
=
'
meter
'
)
y
=
nx
.
NXfield
(
yraw
,
name
=
'
y
'
,
unit
=
'
meter
'
)
y
=
nx
.
NXfield
(
yraw
,
name
=
'
y
'
,
unit
=
'
meter
'
)
rawdata
=
nx
.
NXdata
(
nx
.
NXfield
(
self
.
rawZ
,
name
=
'
height
'
,
unit
=
'
meter
'
),[
x
,
y
],
name
=
'
raw_data
'
)
rawdata
=
nx
.
NXdata
(
nx
.
NXfield
(
self
.
rawZ
,
name
=
'
height
'
,
unit
=
'
meter
'
),[
y
,
x
],
name
=
'
raw_data
'
)
#create detrended data group wit height and slope fields
#create detrended data group wit height and slope fields
height
=
nx
.
NXfield
(
self
.
ze
,
name
=
'
height
'
,
unit
=
'
meter
'
)
height
=
nx
.
NXfield
(
self
.
ze
,
name
=
'
height
'
,
unit
=
'
meter
'
)
xview
=
np
.
linspace
((
self
.
ROIorigin
[
0
]
-
origin_x
)
*
xpix
,(
self
.
ROIorigin
[
0
]
+
self
.
ROIsize
[
0
]
-
origin_x
)
*
xpix
,
num
=
self
.
z
.
shape
[
1
],
endpoint
=
False
)
xview
=
np
.
linspace
((
self
.
ROIorigin
[
0
]
-
origin_x
)
*
xpix
,(
self
.
ROIorigin
[
0
]
+
self
.
ROIsize
[
0
]
-
origin_x
)
*
xpix
,
num
=
self
.
z
.
shape
[
1
],
endpoint
=
False
)
...
@@ -809,7 +809,7 @@ class HeightMap(object):
...
@@ -809,7 +809,7 @@ class HeightMap(object):
slope_x
=
nx
.
NXfield
(
self
.
dzdx
,
name
=
'
slope_x
'
,
unit
=
'
radian
'
)
slope_x
=
nx
.
NXfield
(
self
.
dzdx
,
name
=
'
slope_x
'
,
unit
=
'
radian
'
)
slope_y
=
nx
.
NXfield
(
self
.
dzdy
,
name
=
'
slope_y
'
,
unit
=
'
radian
'
)
slope_y
=
nx
.
NXfield
(
self
.
dzdy
,
name
=
'
slope_y
'
,
unit
=
'
radian
'
)
detrended_height
=
nx
.
NXdata
(
height
,[
x
,
y
],
name
=
'
detrended_height
'
)
detrended_height
=
nx
.
NXdata
(
height
,[
y
,
x
],
name
=
'
detrended_height
'
)
#create the process group with detrending parameters and ROI definition
#create the process group with detrending parameters and ROI definition
region
=
nx
.
NXgroup
(
name
=
'
ROI
'
,
nxclass
=
'
NXregion
'
,
start
=
self
.
ROIorigin
,
count
=
self
.
ROIsize
)
region
=
nx
.
NXgroup
(
name
=
'
ROI
'
,
nxclass
=
'
NXregion
'
,
start
=
self
.
ROIorigin
,
count
=
self
.
ROIsize
)
region
.
region_type
=
nx
.
NXattr
(
'
rectangular
'
)
region
.
region_type
=
nx
.
NXattr
(
'
rectangular
'
)
...
@@ -834,7 +834,7 @@ class HeightMap(object):
...
@@ -834,7 +834,7 @@ class HeightMap(object):
# add a the source data to the process group as alink
# add a the source data to the process group as alink
process
.
data
=
nx
.
NXlink
(
rawdata
)
process
.
data
=
nx
.
NXlink
(
rawdata
)
detrended_slopes
=
nx
.
NXdata
(
slope_x
,[
nx
.
NXlink
(
x
),
nx
.
NXlink
(
y
)],
slope_y
=
slope_y
,
name
=
'
detrended_slopes
'
)
detrended_slopes
=
nx
.
NXdata
(
slope_x
,[
nx
.
NXlink
(
y
),
nx
.
NXlink
(
x
)],
slope_y
=
slope_y
,
name
=
'
detrended_slopes
'
)
#create the process group with detrending parameters and ROI definition
#create the process group with detrending parameters and ROI definition
process
=
nx
.
NXprocess
()
process
=
nx
.
NXprocess
()
process
.
program
=
nx
.
NXattr
(
'
numerical_derivation
'
)
process
.
program
=
nx
.
NXattr
(
'
numerical_derivation
'
)
...
@@ -847,7 +847,7 @@ class HeightMap(object):
...
@@ -847,7 +847,7 @@ class HeightMap(object):
process
.
data
=
nx
.
NXlink
(
detrended_height
)
process
.
data
=
nx
.
NXlink
(
detrended_height
)
# add the data group require by the NXmetrology definition
# add the data group require by the NXmetrology definition
entry
.
data
=
nx
.
NXdata
(
nx
.
NXlink
(
height
),
[
nx
.
NXlink
(
x
),
nx
.
NXlink
(
y
)],
slope_x
=
nx
.
NXlink
(
slope_x
),
slope_y
=
nx
.
NXlink
(
slope_y
))
entry
.
data
=
nx
.
NXdata
(
nx
.
NXlink
(
height
),
[
nx
.
NXlink
(
y
),
nx
.
NXlink
(
x
)],
slope_x
=
nx
.
NXlink
(
slope_x
),
slope_y
=
nx
.
NXlink
(
slope_y
))
entry
.
data
.
set_default
()
entry
.
data
.
set_default
()
#add a drawing in the sample group if defined
#add a drawing in the sample group if defined
if
self
.
sample_drawing
!=
None
:
if
self
.
sample_drawing
!=
None
:
...
...
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