-
Notifications
You must be signed in to change notification settings - Fork 14
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
How to connect DataFrame in a common API to ExoJAX #256
Comments
Let's discuss in the discussion? |
Hello! Sorry for long silence. I have been busy the past few months as I moved from University of Tokyo to JAXA/ISAS (change my institution in your slide). Anyway, I manage to start a common API issue. Currently, I am trying to use dataframe = fetch_exomol(self.simple_molecule_name,
database=self.database,
local_databases=self.path) But I am wondering how we should call pf (partition function) info. Sofar we used # load pf
pf = exomolapi.read_pf(self.pf_file)
self.gQT = jnp.array(pf['QT'].to_numpy()) # grid QT
self.T_gQT = jnp.array(pf['T'].to_numpy()) # T forgrid QT
self.QTref = np.array(self.QT_interp(Tref))
self.QTtyp = np.array(self.QT_interp(self.Ttyp)) I'd like to hear your opinion. |
Hello, congrats on the move ! Our lab worked with Kazuhisa Fujita-sama at JAXA, if you happen to meet him. -- Side note, I think you shouldn't use fetch_exomol() directly. It includes some RADIS specific features, such as storing databases in -- For Partition Functions, I used a RADIS-specific mdb.to_partition_function_tabulator() function, which generates PartFuncExoMol, basically just an interpolator which returns I think you should keep on using the ExoJax syntax you showed above. mdb = MdbExomol(
local_path,
molecule=molecule,
name=databank_name,
local_databases=local_databases,
nurange=[
load_wavenum_min if load_wavenum_min is not None else 0.0,
load_wavenum_max if load_wavenum_max is not None else np.inf,
],
engine=engine,
cache=cache,
skip_optional_data=skip_optional_data,
)
#...
T_gQT, gQT = mdb.T_gQT, mdb.gQT (link to common-api branch) |
Hello @erwanp, Thanks a lot. I see. Then, first, I will try to wrap |
Yes, agreed. These API will take some time before they reach their final form. Even after you call So in from radis.api.exomol import MdbExomol
class MdbExoMol(MdbExomol):
... |
I think I managed to connect radis/api/exomolapi.py (working at common-api branch) to exojax/spec/api.py (working at radisapi branch) for ExoMol. tests in ExoJAX
tests in radis
Before I move on HITEMP, I'd like you to make sure this is the right direction. I found, for HITEMP unlike ExoMol, MdbExomol like class does not exist in radis yet. Instead, I found |
Hello ! So it should be fairly easy to just duplicate the changes, unless you see a problem I missed ? |
OK, then, I will try to implement it the same way as mdbExomol 😃 Thanks! |
@erwanp |
@erwanp Sorry to keep asking questions. What is the main reason for implementing hitranapi and hitempapi separately? Maybe data format? |
Many parts are common, but the download is different. |
Hapi is pip installable. The pip package name is |
Thanks! Oh really. I did not notice that.
I see. So, it's presumably better to have separate moldbs in ExoJAX too. |
#309 removed the old moldb. So, now ExoJAX officially determined to use radis.api as I/O of ExoMol, HITRAN, and HITEMP. |
@ykawashima @chonma0ctopus
The text was updated successfully, but these errors were encountered: