Closed kalok87 closed 9 years ago
Sure there's two alternatives. You either access the bounds object on the Image, which has an lbrt method, returning both the xlim and ylim or you can simply call Image.range('y') or equivalently Image.range(1).
Dear Philipp, I am using: import Image b = Image.range('y') which gives me a error in Topo: AttributeError: 'module' object has no attribute 'range'
What is that problem? I am using the newest version of Topo.
Range is a method on the Image objects, where you previously accessed ylim, it's got nothing to do with the Image library, so your access should look something like this based on your example: topo.sim.V1.views.OrientationMap.last.range('y')
Thank for your replying, Phillipp. But after using topo.sim.V1.views.OrientationMap.last.range('y'), I get a result (None,None). What happens here?
Could you tell me what you get when executing topo.sim.V1.views.OrientationMap.last.dimensions()
. You should pass the name of the second dimension to the range
method to get the corresponding range values.
When I am using print topo.sim.V1.views.OrientationMap.last.dimensions(), I get [ ] which is an empty list.
Have you measured an OrientationMap?
Philipp, here is my command: measure_or_pref() p = topo.sim.V1.views.maps.OrientationPreference.last.data s = topo.sim.V1.views.maps.OrientationSelectivity.last.data b = topo.sim.V1.views.OrientationMap.last.range('y') print topo.sim.V1.views.OrientationMap.last.dimensions()
Is there anything wrong?
Sorry my fault, left out the maps part. This should work:
topo.sim.V1.views.maps.OrientationSelectivity.last.range('y')
But really you should just be accessing the return value of measure_or_pref directly.
data = measure_or_pref()
data.OrientationPreference.V1.last # The orientation map
data.OrientationPreference.V1.last.bounds.lbrt() # The left, bottom, right and top coordinate of the OR map
data.OrientationPreference.V1.last.range('y') # The y-range of the OR map, equivalent to bottom and top
Thank you, Philipp, there are a lot of helps.
Hallo, I used to record the size of V1 map by using: topo.sim.V1.views.maps.OrientationSelectivity.last.ylim
But it doesn't work now, is there any replacement command for this?
thank you