Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing rii materials? #19

Open
ckemere opened this issue Oct 2, 2017 · 8 comments
Open

Installing rii materials? #19

ckemere opened this issue Oct 2, 2017 · 8 comments

Comments

@ckemere
Copy link

ckemere commented Oct 2, 2017

I have trouble running the example files because none of the materials appear to have installed when I ran setup.py. Any suggestions?

@jordens
Copy link
Member

jordens commented Oct 3, 2017

The refractiveindex.info materials are installed. The unittested and the tutorial use them. For the zemax and Oslo data you'll have to follow the instructions. updates to them would be appreciated.

@jordens
Copy link
Member

jordens commented Mar 15, 2018

Ping. Is this resolved?

@AndyPhil
Copy link

Hello,
For my part I am using Mac OS so *.exe files will not work, correct?
[get and install http://www.lambdares.com/images/OSLO/OSLO662_EDU_Installer.exe
get and install http://downloads.radiantsourcemodels.com/Downloads/Zemax_2015-03-03_x32.exe]

Moreover when I try to access the files directly a browser, the files appear to be absent. Would it be possible to post the files somewhere else where they could be loaded from using any OS?

Thanks

@jordens
Copy link
Member

jordens commented Mar 31, 2018

I don't.know whether Oslo and/or zemax are supported under osx.
It would be great if you could determine the current location of the downloads of the eval versions for Oslo and Zemax and submit a pull request with the updated urls.

@gabeycas
Copy link

gabeycas commented Dec 13, 2018

It looks like Zemax has moved to an online demo for evaluation, so the download might not exist anymore. The rayopt.library import wants an agf file, and other sources for glass catalogs seem to work.

For example Edmund Optics has a glass cat with the materials in their lenses here:
https://www.edmundoptics.com/globalassets/documents/2018glasshop.agf

The Schott catalog is here:
https://www.schott.com/advanced_optics/english/download/index.html

@numbersofpi
Copy link

Hello,
I have the same question. I'd like to use Thorlab's catalog which is downloadable as a .zmx file in a zip folder here: https://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=Zemax
Can someone please explain what commands are necessary to install this library? It looks like library.py and zemax.py can access .zmx file extensions but I'm not sure how to use them.

@GProtoZeroW
Copy link

I am still trying to learn this library as well and thus don't know how to set catalogs, yet. However, based on code in one of the examples notebooks I flushed it out a bit more in order to use the refractiveindex.info search that is build in the latest version of rayopt that I am using as of 20200426:

import rayopt as ro
import pandas as pd

def refractiveindex_search(name_contains, return_result='Df', result_to_use=0):
    """
    Args:
        name_contains (str): search quarry name to search for in refractiveindex.info for
        set_result (bool/str; 'Df'): when True return the name set by `result_to_use` to use, 
            when set to 'Df' will return a pandas Dataframe of results, 
            if False will print the Dataframe of results
        result_to_use (int; 0): wich of the results to return
    
    Returns:
        Will print a results of the colomnated df of results from the refractiveindex.info if `return_result` is `True`
        will return of pandas Df of results if `return_result` is set to 'Df'
    """
    results=pd.DataFrame(columns=['name', 'catalog_name', 'catalog_source'])
    
    lib = ro.Library.one()
    for i, g in enumerate(lib.session.query(
        ro.library.Material).filter(
        ro.library.Material.name.contains(name_contains))):
        
        results.loc[i]=[g.name, g.catalog.name, g.catalog.source]
    
    #just print results
    if return_result==False:
        print(results)
    #return results Df
    elif return_result=='Df':
        return results
    #return just the ithe name set by `result_to_use`
    elif return_result==True:
        return results.iloc[result_to_use]['name']

I am going to start updating in the exsample notebooks using this to change materials to calll the names from refractiveindex.info

@mabl
Copy link
Contributor

mabl commented May 29, 2020

#31 provides fixes to allow Zemax import with their latest demo files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants