-
Notifications
You must be signed in to change notification settings - Fork 17
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
No output from get_ae8_ap8_flux (IDL) #45
Comments
Hi Elias,
With the last print outputing the following values:
One thing I might note is that the |
Hi Antoine,
I will make a version of my script and send it to you. I read orbit data from SPICE, but I will modify it so that you can run it w/o SPICE. I am at a meeting all week, so I might take some time to prepare this.
Best regards,
Elias
From: AntoineBrunet ***@***.***>
Reply to: PRBEM/IRBEM ***@***.***>
Date: Tuesday, 12. March 2024 at 11:47
To: PRBEM/IRBEM ***@***.***>
Cc: ***@***.***" ***@***.***>, Author ***@***.***>
Subject: Re: [PRBEM/IRBEM] No output from get_ae8_ap8_flux (IDL) (Issue #45)
Hi Elias,
Thanks for raising this issue. I can't seem to reproduce what you describe on my system. Could you provide a minimal working example program which exhibit the problem?
For instance, here is a simple program which works fine on my computer (using the latest commit on the main branch):
lib_name = '/path/to/libirbem.so'
ntime_max = 1L
call_external(lib_name, 'get_irbem_ntime_max_', ntime_max)
ntime = 100L
energy=DINDGEN(25)*0.135 -2d
energy=10d^energy
energy=transpose([[energy],[energy]])
nene=25L
BBo = dblarr(ntime_max)
BBo[0:ntime-1] = 1.0D
L = dblarr(ntime_max)
L[0:ntime-1] = 4.0D
flux = dblarr(ntime_max, 25)
call_external(lib_name, 'get_ae8_ap8_flux_idl_', ntime, 1, 1, Nene, energy, BBo, L, flux, /f_value)
print, flux[0,*]
With the last print outputing the following values:
-1.0000000e+31
-1.0000000e+31
-1.0000000e+31
-1.0000000e+31
-1.0000000e+31
-1.0000000e+31
1.4475565e+08
1.1932466e+08
53816808.
44246431.
33871506.
16508976.
11993159.
3375804.8
5452610.2
1957690.6
1082774.6
468565.28
199310.54
44900.266
2168.5903
-1.0000000e+31
-1.0000000e+31
-1.0000000e+31
-1.0000000e+31
One thing I might note is that the flux array should be of shape (ntime_max, 25), not (ntime, 25) as you mentioned in your message. This error would throw a segmentation fault on Linux, but I'm not sure about the behaviour on MacOS.
—
Reply to this email directly, view it on GitHub<#45 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKV6A2JGOJ5USMMGAX2B2OTYX3MK7AVCNFSM6AAAAABEPCTQQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJRGM2DMMZRGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
When running the following command in IDL
IDL> resultf = call_external(lib_name, 'get_ae8_ap8_flux_idl_', ntime,whichm,whatf,Nene,energy,BBo,Lm,flux,/f_value)
the returned flux array (sized: [ntime, 25], where 25 is the number of energies, ntime is the number of time steps), returns only flux[0,*]=-1e+31 and the rest of the array elements as zeros. The flux array is of double precision, as indicated in the documentation.
The energy array is predefined as:
IDL> energy=DINDGEN(25)*0.135 -2d
IDL> energy=10d^energy
IDL> energy=transpose([[energy],[energy]])
IDL> nene=25l
with dimensions of [2,25], values given in MeV.
Time series of BBo and Lm have been calculated in previous steps, succesfully, using:
IDL> result = call_external(lib_name, 'make_lstar_',ntime,kext,options,sysaxes,iyr,idoy,ut, x1,x2,x3, maginput,lm,lstar,blocal,bmin,xj,mlt, /f_value)
IDL> BBo = blocal/bmin
with minimum Lm value of about ˜4.58.
I have tested values of whichm of 1, 2 & -1) and whichf of 1 & 3.
I have also tried using the example_1.pro, which calls
fly_in_meo_gnss_
usingnene=25l
& an energy array of zerosenergy=DBLARR(2,50)
. example_1.pro does return valid results throughfly_in_meo_gnss_
. But it does not work forget_ae8_ap8_flux_idl_
(I still get the same empty flux array as output).I use IDL 8.8.0 (darwin x86_64 m64) (MacOS Monterey 12.6.5). IRBEM was obtained from this repository and successfully installed. The problem is the same when I use 'FLY_IN_NASA_AEAP' also.
resultf = call_external(lib_name, 'fly_in_nasa_aeap_', ntime,sysaxes,whichm,whatf,Nene,energy,iyr,idoy, ut,x1,x2,x3,flux, /f_value)
Any suggestion?
Elias
The text was updated successfully, but these errors were encountered: