Thank you!
Thank you Michael for the quick answer! It appears to do the trick:%timeit M1_surf.SurfaceData.SetNthZernikeCoefficient(4, 6.46449601150208e-06)12.7 ms ± 241 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)I get an even greater (4x) speedup by disabling the undo function from the Project Preferences menu: any way to do this programmatically? Thanks again, Paolo
Hi Mark, I did some more experimenting on the attached file of a simplified off-axis Cassegrain telescope. It appears that when ray aiming is turned on, the pupil solve returns the EXP position of the on-axis design, since the chief ray of the on-axis field is directed towards the vertex of the parent parabola, and not the center of the actual mirror (see figures below).This appears to be consistent with what I find in the manual: “Pupil Position -This solve will place the next surface at the pupil position for the optical space following refraction from the current surface. The pupil position is determined by tracing real, differential rays about the central field chief ray.”I guess my question then is: how do I make ray aiming trace the chief ray to the center of the mirror? I tried with the pupil shift option, but it’s not having any difference. With ray aiming off (only chief rays shown):Real ray aiming on: Thanks, Paolo
Hi,I was following this very useful example to extract Zernike terms, but found discrepancies with what OpticStudio is calculating in the Zernike window. The problem seems to be that retrieving terms 1-11 uses 11 terms fitting, while 12-36 use 36 terms fitting, so I cannot retrieve a consistent set of terms (i.e. from the same fitting).In the MFE, the fitting is done according to the highest term in the editor, but here apparently every call to GetOperandValue() performs the fitting from scratch, making the entire procedure not consistent for terms > 11.Is there any way around this? Thanks,Paolo
Dear Sandrine, thank you very much for your answer! I am already printing directly on a file, not on screen. Here below is the bit of code I am using.The PSF computing part seems to be quite fast (I am using sampling=3): it's really the writing to disk that takes most of the time. Do you know of any way other than ZOS-API? I don't have a professional license and cannot get one soon enough. temp_file$ = $TEMPFILENAME() OUTPUT temp_file$ FOR field= 1, n_fields, 1 GETPSF wave, field, sampling, vector, unnormalized, phaseflag, imagedelta np = vec1(0) FORMAT .7 EXP FOR i= 1, np, 1 &nbs
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.