-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
In Topobank, before loading the data we're checking the channels of the readers in order to get more information.
I have a SUR file here, which does not report an height scale factor in the channel, so TopoBank allows the user
to specify a height scale factor on upload (default: 1).
In fact the file has already an height scale factor in the metadata and therefore SurfaceTopography
does not allow to instantiate the measurement with a given high scale factor. Because of this, the
file cannot be used yet in TopoBank.
Here an example:
In [2]: reader = open_topography("topo_10737.sur")
In [3]: reader.channels
Out[3]: [<SurfaceTopography.IO.Reader.ChannelInfo at 0x7f80edf0b6a0>]
In [4]: t=reader.topography()
In [5]: t
Out[5]: <SurfaceTopography.UniformLineScanAndTopography.StaticallyScaledUniformTopography at 0x7f80edf0ba60>
In [9]: t.height_scale_factor
Out[9]: 1.0000000116860974e-07
In [10]: reader.channels[0]
Out[10]: <SurfaceTopography.IO.Reader.ChannelInfo at 0x7f8074993d60>
In [11]: ch=reader.channels[0]
In [12]: ch.height_scale_factor is None
TrueI would expect either ch.height_scale_factor == 1.0000000116860974e-07 or t.height_scale_factor must be given on instantiation.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working