/* Spectroscopic Toolkit version 1.93, july 13, 2008. Copyright (c) 2000-2008 - Pieter Suurmond Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Using the binary database-file 'gfall.pbin', produced by the 'pconv'-program that reads Robert Kurucz's latest data file. To construct, query and cleunup a datastructure in memory containing hydrogen lines. Facilitates access by just 4 numbers: jd, jl, el, ed. */ /*------------------------------------------------------------------*/ typedef struct { int numEDIF; /* Number of 'lines' in array. */ pieterPacked* line; /* Pointer to array of 'lines'. */ } EDIF_SERIES; typedef struct { int numELOW; EDIF_SERIES* EDIFseries; } ELOW_SERIES; typedef struct { int numJLOW; ELOW_SERIES* ELOWseries; } JLOW_SERIES; typedef struct /* Struct to contain all series. */ { int numJDIF; JLOW_SERIES* JLOWseries; } JDIF_SERIES; JDIF_SERIES* init_JEBASE(FILE* msg); /* Creates and initializes an SERIES_STRUCT object. Call free_Hbase() after you are done with the SERIES_STRUCT object. Diagnostics are fprintf-ed to stream msg when msg is not NULL. */ JDIF_SERIES* init_JEBASE_HeP(FILE* msg); /* Same for some He+ lines. */ pieterPacked* ask_JEBASE(JDIF_SERIES* JE, int dj, int lj, int le, int de); /* Returns pointer to pieterPacked linedata if successful. Returns NULL on failures. Looks up line in a 4-dimensional space. Argument dj is the difference between higher and lower J minus 1. Argument lj is the lower J. Argument le is the lower energy- level index. Argument de is the difference between higher and lower level (index). */ void free_JEBASE(JDIF_SERIES** j); /* Call this after init_Hbase(). No problem if *j (or even j itself) is NULL. */