Solved

Detector Polar "Show Data" and NSDP Issue

  • 24 September 2022
  • 4 replies
  • 104 views

Userlevel 1

Hello,

          I am having an issue with the polar detector.  First, I am not sure if there was an update to lock the data type in the detector viewer, but the “Show Data” is locked to “Angle Space”.  Is this new or is it locked due to my source type?

 

 

Additionally I am not getting data returned in the optimization editor for the NSDP operand.

 

I followed another thread that was out there and still cannot get any data returned to the optimizer.  I created another file with just a polar detector and a single ray, but I get the same result that I can see the ray hit the detector in the viewer at different angles as I change them, but nothing in the merit function editor.

I am clearly doing something wrong, but my troubleshooting efforts have so far failed.

icon

Best answer by David.Nguyen 26 September 2022, 12:39

View original

4 replies

Userlevel 7
Badge +3

I think the detector polar does return only angle data. 

You have the Detector object number set at zero in your merit function.

I don’t know if that’s the problem, and it’s very hard to debug problems based on;ly on screenshots. It’s best if you can attached the ZAR for your file.

  • Mark
Userlevel 1

I think I am remembering back in 2017/2018 version that you could change to other data types, but am not certain

I tried changing the det# in the merit function to no avail.  Also, when I change the weight and target to any number OpticStudio resets it to zero when I refresh the MFE.

Thanks.

Userlevel 7
Badge +2

Hi Michael,

 

NSDP can read Detector Polar data provided you run a raytrace first. This is typically done with the operand NSTR.

NSTR

Non-sequential trace. Src# refers to the object number of the desired source. If Src# is zero, all sources will be traced. If Splt? is non-zero, then splitting is on. If Scat? is non-zero, then scattering is on. If Pol? is non-zero then polarization will be used. If splitting is on polarization is automatically selected. If IgEr? is non-zero, then errors will be ignored. See “Optimizing with sources and detectors in non-sequential mode” for complete details.
An NSDD, NSDE, or NSDP operand with Det# set equal to 0 must be included in the merit function prior to this operand.
See also NSST.

Also, in your file, the Det# of the NSDP operand was set to 1, but your Object 1 is a Source Rectangle. I belive Det# should have been 19.

I changed the Pix# to -3 to read the Total Hits and this is the result in the Merit Function and in the Detector Polar Viewer:

As you can see, the NSDP operand reports 3.742E+05, and the Total Hits is 374157. The operand rounds the value in scientific notation, but I’m confident that in the background OpticStudio uses the actual value 374157.

Notice how I setup a NSTR operand before NSDP. I set the IgEr? (ignore error) to 1.0. Also, please note that anything that appears after DMFS will be erase whenever you regenerate a Merit Function.

DMFS

Default merit function start. This operand is a flag to indicate where the default merit function should be appended, if one is subsequently created. The row number after this operand will appear as the default “Start At” row on the default merit function dialog box.

 

I hope this helps and take care,

 

David

Userlevel 1

Hi David,

                Thank you for explaining the mistake.  I appreciate the help!

Reply