[Date Index] [Thread Index] [Author Index]
Database in Module ?
I have create a database for various optical materials for their complex index of refraction over a certain wavelength region. I typically call the module by the function nk("Si", 13.4). This then returns the complex index of refraction for the element Silicon at the desired wavelength for example. The module works fine except that it stores some 10,000 or so data points (in a 2D Matrix) and that it needs to be loaded (I load the nk.nb notebook and hit shift-enter so it's in memory) every time before I want to use the module nk in another program. I suppose one can write a package and then load that package from a designated directory. Given that I have never written a package program before and that I don't really want to spend much time on modifying a program that already seems to work what is the best way for me so I don't have to run the module "nk" every time I want to use it? thanks, Chris PS. If converting the module to a package is indeed the preferred way to do this then I suppose I should learn how to do this!