Open antonysigma opened 1 year ago
Looks like it's not in the library. Either it was deleted or it never was in the default library. I'd either inspect the library and see whether it's in there or use another material, e.g. N-SK4
etc.
Hmm... I got the same "material not found error for N-SK4
.
I tracked down the library.sqlite
database file to search for the material SK4
. It seems like the exact name is SCHOTT-SK|N-SK4
. Is such a naming style intentional?
$ cd path/to/rayopt/
$ sqlite3 library.sqlite
sqlite> select name from material where name like '%SK4%';
SCHOTT-SK|N-SK4
HIKARI-SK|E-SK4
SUMITA-SK|K-SK4
SUMITA-SSK|K-SSK4
sqlite> .q
$
Have you solved the problem?
@ffgg11 @jordens No I haven't solved the problem, only found the root cause.
Here, if we relabel the material from SK4
to SCHOTT-SK|N-SK4
, the Triplet example Jupyter script can proceed without error.
text = """
O 0 0 .364 AIR
S 21.25 5 6.5 SCHOTT-SK|N-SK4
S -158.65 2 6.5 AIR
...
"""
I call it an adhoc solution because the exact material identifier cannot be known in advance. We need a feature to query materials by the keyword, but I don't know RayOpt's internal architecture (SQLAlchemy) to submit a PR.
I mean, query features like what other authors did at https://github.com/HugoGuillen/refractiveindex.info-sqlite .
@ffgg11 @jordens No I haven't solved the problem, only found the root cause.
Here, if we relabel the material from
SK4
toSCHOTT-SK|N-SK4
, the Triplet example Jupyter script can proceed without error.text = """ O 0 0 .364 AIR S 21.25 5 6.5 SCHOTT-SK|N-SK4 S -158.65 2 6.5 AIR ... """
I call it an adhoc solution because the exact material identifier cannot be known in advance. We need a feature to query materials by the keyword, but I don't know RayOpt's internal architecture (SQLAlchemy) to submit a PR.
I mean, query features like what other authors did at https://github.com/HugoGuillen/refractiveindex.info-sqlite .
Thank you for reply. Two days ago, I found another nice open source implementation, named Pyrate. The link of Pyrate is
@ffgg11 @jordens No I haven't solved the problem, only found the root cause.
Here, if we relabel the material from
SK4
toSCHOTT-SK|N-SK4
, the Triplet example Jupyter script can proceed without error.text = """ O 0 0 .364 AIR S 21.25 5 6.5 SCHOTT-SK|N-SK4 S -158.65 2 6.5 AIR ... """
I call it an adhoc solution because the exact material identifier cannot be known in advance. We need a feature to query materials by the keyword, but I don't know RayOpt's internal architecture (SQLAlchemy) to submit a PR.
I mean, query features like what other authors did at https://github.com/HugoGuillen/refractiveindex.info-sqlite .
Thanks for your reply. two days ago, I found another nice open source implementation, named Pyrate. The link of it is “https://salsa.debian.org/mess42/pyrate”. Pyrate includes many optimization method, such as “CG, Powell” and so on.
Hi I like the rayopt library and the integration with the
scipy.optimize
for lens curvature optimization. However, when I run the tutorialTriplet.ipynb
in therayopt-notebook
repo, it fails to retrieve the materialSchott/SK4
. What is missing in the installation?Reference: https://github.com/quartiq/rayopt-notebooks/blob/master/triplet.ipynb