I want to measure the amount of power on a surface between particular angles.
I used a rectangle detector which parameters 12-15, in the user manual it says it work only for radion intensity.
Usermanual:
The minimum and maximum x and y direction angles in degrees. These settings are
used to control the sensitivity of the detector to rays incident upon the detector
at an angle when displaying radiant intensity or radiance in angle space.
The default setting is -90.0 degrees to +90.0 degrees in both x and y directions,
which allows display of angle data for all rays striking the detector.
If the angular range is set to cover a subset of the possible incident angles,
rays that strike the detector at angles outside the defined range are ignored
ONLY for radiant intensity and radiance in angle space displays.
So I used the macro function:
Ptotal(i) = NSDD(1,17,0,2)
Where I should get the total flux in angle space for all pixels. But this still hold the default value of +90° to -90°.
So my question is what do I wrong or is it not possible to measure amount of power on a surface between particular angles by ZPL macro.
Best answer by Zach Derocher
Hi Joep,
I think there are a couple ways you could do this, depending on exactly what you need. If you wanted to achieve this from purely within the macro, and you only need data for a particular angular 'bin' (i.e. between +/-10 degrees, but no other data is required), then I think you're on the right track. Before running the ray trace, you need to set the angular limits. You can do this by:
a. change your detector's min/max angle settings (via the SETNSCPARAMETER keyword in the ZPL)
b. run a new ray trace
c. retrieve the results for the acceptance angle defined in (a)
d. repeat if desired.
I've attached a simple macro to demonstrate; note that this macro assumes the detector is object#3.
The problem is that if you need these results for a range of different angular bins, one approach could be to pre-define a set of Detector Rectangle objects, all of which are nearly co-located in space, and each of which has a particular acceptance angle. Then, you could run a single ray trace, and by retrieving results from different detectors you can see the results for different angular regions.
A second option would be to use a single ray trace, but make use of filter strings to extract only a particular bin of angular data. This would best be achieved by setting up a Detector Viewer window in 'text' mode, and extracting the data via the GETT() numeric function.
One other option would be to use NSDD in angular mode, but with pix > 0 to retrieve individual pixel value. When used in angular mode, the detector pixels represent angular bins. By using pix>0, you can retrieve data from a single pixel at a time. So, you can retrieve the data from a set of pixels which spans the desired angular region this way, by looping over a subset of detector pixels.
I think there are a couple ways you could do this, depending on exactly what you need. If you wanted to achieve this from purely within the macro, and you only need data for a particular angular 'bin' (i.e. between +/-10 degrees, but no other data is required), then I think you're on the right track. Before running the ray trace, you need to set the angular limits. You can do this by:
a. change your detector's min/max angle settings (via the SETNSCPARAMETER keyword in the ZPL)
b. run a new ray trace
c. retrieve the results for the acceptance angle defined in (a)
d. repeat if desired.
I've attached a simple macro to demonstrate; note that this macro assumes the detector is object#3.
The problem is that if you need these results for a range of different angular bins, one approach could be to pre-define a set of Detector Rectangle objects, all of which are nearly co-located in space, and each of which has a particular acceptance angle. Then, you could run a single ray trace, and by retrieving results from different detectors you can see the results for different angular regions.
A second option would be to use a single ray trace, but make use of filter strings to extract only a particular bin of angular data. This would best be achieved by setting up a Detector Viewer window in 'text' mode, and extracting the data via the GETT() numeric function.
One other option would be to use NSDD in angular mode, but with pix > 0 to retrieve individual pixel value. When used in angular mode, the detector pixels represent angular bins. By using pix>0, you can retrieve data from a single pixel at a time. So, you can retrieve the data from a set of pixels which spans the desired angular region this way, by looping over a subset of detector pixels.
I’m having the same issue as Joep and am interested in looking at this macro. Whenever I download and extract with any standard zip file utility, it says it’s not an archive. If I change the file extension to .zpl, that also doesn’t work. Any tips?
In non-sequential mode, to measure the power within a specific cone angle, look at using a filter string. Here’s one of the example strings described in the help documentation:
In this case, the flat object can be a Detector Rectangle.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.