Solved

NSDE Data# not working as expected

  • 2 March 2021
  • 5 replies
  • 67 views

Userlevel 2

Can you confirm the Data# field of NSDE is not working as expected, both in ZPL and MF?


Help reference: The Optimize Tab (non-sequential ui mode) > Automatic Optimization Group (optimize tab, non-sequential) > Merit Function Editor (optimize tab, non-sequential) > NSC Operands 


I expect the following to work in fully non sequential mode:


! Detector color object reference

det = 4

TotalFlux = NSDE(1,det,0,0,0,0)

MaxIrradiance = NSDE(1,det,-1,0,1,0)


But actually, the following work for me, i.e. return the correct quantity:

TotalFlux = NSDE(1,det,0,0,1,0)

MaxIrradiance = NSDE(1,det,-1,0,2,0)


Therefore, if this is confirmed, the Data# reported in the table of the Help is wrong and should be incremented by 1.


Thank you

icon

Best answer by Csilla Timar-Fulep 2 March 2021, 12:46

View original

5 replies

Userlevel 5
Badge +2

Hi Alberto,


Thanks for your question here on the forums!


I have checked it and you are right, you will need to use the following assignments:



TotalFlux = NSDE(1,det,0,0,1,0)
MaxIrradiance = NSDE(1,det,-1,0,2,0)

It is described correctly in the Help system at:


The Optimize Tab (sequential ui mode) > Automatic Optimization Group > Merit Function Editor (automatic optimization group) > Optimization Operands by Category > Non-sequential Ray Tracing and Detector Operands



I can see you referred to another place in the Help:


The Optimize Tab (non-sequential ui mode) > Automatic Optimization Group (optimize tab, non-sequential) > Merit Function Editor (optimize tab, non-sequential) > NSC Operands



The table given here only applies for the assignments for the NSDD operand. I believe this is not crystal clear from the desciption, so I have gone ahead and initiated a help file modification to make it unequivocal. Apologies for the inconveniences!


I hope this clears things up a bit. If you have further questions, please do not hesitate to ask!


Thanks,


Csilla

Userlevel 2

Thank you very much for the clarification. I often find very difficult to find what I really need in the Help, especially when talking about ZPL. Some functions are called like the operands and are described elsewhere. 

I would suggest to switch from chm files to html with improved readability. Also much more keywords and hyperlinks between different parts of the Help would improve the experience. But this is matter for a different topic.


Thanks again

Userlevel 5
Badge +2

Hi Alberto,


Thanks for your feedback.


We are constantly working on improving the Help file, so thanks for your input regarding that too.


Best,


Csilla

Userlevel 7
Badge +2

Hi Alberto,


For ZPL, this is what I can recommend to search the Help File.


There are three sections of interest:



  1. KEYWORDS (The Programming Tab > About the ZPL > KEYWORDS (about the zpl) or just search KEYWORDS)

  2. Numeric Functions (The Programming Tab > About the ZPL > Numeric Functions or just search Numeric)

  3. String Functions (The Programming Tab > About the ZPL > String Functions  or just search String Function)


These are the places where you'll find most of the information.


If you need something which returns a number, for example, the Thickness of a particular surface. It'll most likely be in the Numeric Functions. Those functions return numeric values, as the name suggest.


If you need something which returns a string, for example, the comment in a particular surface. You'll find it in the String Functions.


Finally, KEYWORDS typically don't return anything. They are here to modify the system/lens only.


I hope this can help.


Take care,


David

Userlevel 2

Hi David, 


thank you for the clarification. I'll immediately add them to my Help Favourites.


Best regards,


Alberto

Reply