irfu / irfu-matlab

Matlab routines to work with space data, particularly with MMS and Cluster/CAA data. Also some general plasma routines.
59 stars 46 forks source link

Error using irf_get_data with specified time interval #10

Closed LoveAlm closed 10 years ago

LoveAlm commented 10 years ago

I've recenstly gone back to some plottin routines I haven't used since late last year. When I try to load data from any dataset using irf_get_data('tint','DATASET','caa','mat') it returns an empty structure. With the following message:

[warning: caa_load(119)] loading C1_CP_PEA_PITCH_SPIN_DPFlux from location:CAA/C1_CP_PEA_PITCH_SPIN_DPFlux*.cdf [critical: caa_load(130)] Did not succeed! Error loading: C1_CP_PEA_PITCH_SPIN_DPFlux [warning: caa_load(136)] CAA_LOAD : nothing to load [warning: c_caa_var_get(172)] C1_CP_PEA_PITCH_SPIN_DPFlux could not be loaded! [warning: c_caa_var_get(225)] Nothing is loaded

It doesn't matter which dataset I choose and re-downloading them does nothing. The function still returns an empty data structure. Without a specified time interval the data loads as expected.

Are there any know problems in recent updates that matches this problem?

Love

vaivads commented 10 years ago

This should be fixed in v1.5.0 that I just released (the bug was introduced when fixing that irfu-matlab handles also THEMIS data sets). Please check!

On Tue, Mar 11, 2014 at 9:43 AM, LoveAlm notifications@github.com wrote:

I've recenstly gone back to some plottin routines I haven't used since late last year. When I try to load data from any dataset using irf_get_data('tint','DATASET','caa','mat') it returns an empty structure. With the following message:

[warning: caa_load(119)] loading C1_CP_PEA_PITCH_SPIN_DPFlux from location:CAA/C1_CP_PEA_PITCH_SPIN_DPFlux*.cdf [critical: caa_load(130)] Did not succeed! Error loading: C1_CP_PEA_PITCH_SPIN_DPFlux [warning: caa_load(136)] CAA_LOAD : nothing to load [warning: c_caa_var_get(172)] C1_CP_PEA_PITCH_SPIN_DPFlux could not be loaded! [warning: c_caa_var_get(225)] Nothing is loaded

It doesn't matter which dataset I choose and re-downloading them does nothing. The function still returns an empty data structure. Without a specified time interval the data loads as expected.

Are there any know problems in recent updates that matches this problem?

Love

— Reply to this email directly or view it on GitHubhttps://github.com/irfu/irfu-matlab/issues/10 .

LoveAlm commented 10 years ago

Did a clear install of v1.5.0 and the problem persist though in a different form. irf_get_data without time interval still works and caa_download normaly though it seems to encountered an error in the example below. When I run: irf_get_data(tint2,'Data__C1_CP_PEA_PITCH_SPIN_DPFlux','caa','mat')

I get:

[warning: caa_load(119)] loading C1_CP_PEA_PITCH_SPIN_DPFlux from location:CAA/C1_CP_PEA_PITCH_SPIN_DPFlux*.cdf [critical: caa_load(130)] Did not succeed! Error loading: C1_CP_PEA_PITCH_SPIN_DPFlux [warning: caa_load(136)] CAA_LOAD : nothing to load [warning: c_caa_var_get(186)] C1_CP_PEA_PITCH_SPIN_DPFlux could not be loaded! [warning: caa_download(443)] Be patient! Submitting data request to CAA... Error using loadlibrary (line 419) There was an error loading the library "libcef_pcwin64" The specified module could not be found.

Error in cefinit (line 6) loadlibrary (['libcef' lower(computer)], @libcef_mfile,'alias','libcef')

Error in c_caa_cef_var_get (line 50) cef_init();

Error in c_caa_var_get (line 218) ttt = c_caa_cef_var_get(varName,'tint',tint,'stream');

Error in irf_get_data (line 75) f=c_caa_var_get(parameter,format,'tint',tint);

Caused by: Error using loaddefinedlibrary The specified module could not be found.

Love

vaivads commented 10 years ago

released v1.5.1 where I have fixed that program checks whether ceflib is installed (on windows we do not have ceflib libraries, unfortunately).

In addition, your log says "[warning: caa_load(119)] loading C1_CP_PEA_PITCH_SPIN_DPFlux from location:CAA/C1_CP_PEA_PITCH_SPINDPFlux.cdf" while there should be directory separator before "_.cdf", it should be "/*.cdf". Can you confirm that there is no "/" also in your matlab output window. What does return command "filesep" for you in matlab?

vaivads commented 10 years ago

the second part of my previous post you can neglect, this is just an effect of using markdown in github comments.

LoveAlm commented 10 years ago

The ceflib issue is resolved but I am still getting my original error.I have repeated the process for other data sets, from other instruments, with the same result. This an example of what I current get for an arbitrary dataset with and without time intervals:

idpf1=irf_get_data(tint2,'Differential_Particle_Flux__C1_CP_CIS-HIA_PAD_HS_MAG_IONS_PF','caa','mat')
  [warning: caa_load(119)] loading C1_CP_CIS_HIA_PAD_HS_MAG_IONS_PF from location:CAA/C1_CP_CIS-HIA_PAD_HS_MAG_IONS_PF\*.cdf
[critical: caa_load(130)] Did not succeed! Error loading: C1_CP_CIS_HIA_PAD_HS_MAG_IONS_PF
  [warning: caa_load(136)] CAA_LOAD : nothing to load
  [warning: c_caa_var_get(186)] C1_CP_CIS_HIA_PAD_HS_MAG_IONS_PF could not be loaded!
  [warning: c_caa_var_get(249)] Nothing is loaded

idpf1 =

 []

>> idpf1=irf_get_data('Differential_Particle_Flux__C1_CP_CIS-HIA_PAD_HS_MAG_IONS_PF','caa','mat')
  [warning: caa_load(119)] loading C1_CP_CIS_HIA_PAD_HS_MAG_IONS_PF from location:CAA/C1_CP_CIS-HIA_PAD_HS_MAG_IONS_PF\*.cdf

idpf1 = 

    t: [4715x1 double]
    dep_x: {[1x1 struct]  [1x1 struct]}
    data: [4715x16x31 single]
       dt: [1x1 struct]

Love

vaivads commented 10 years ago

released v1.5.2, please check. The way cdf files are created from cef files seems that the solution is still not universal, i have to contact CAA to understand why.

On Mon, Mar 17, 2014 at 2:01 PM, LoveAlm notifications@github.com wrote:

The ceflib issue is resolved but I am still getting my original error.I have repeated the process for other data sets, from other instruments, with the same result. This an example of what I current get for an arbitrary dataset with and without time intervals:

idpf1=irf_get_data(tint2,'Differential_Particle_Flux__C1_CP_CIS-HIA_PAD_HS_MAG_IONS_PF','caa','mat') [warning: caa_load(119)] loading C1_CP_CIS_HIA_PAD_HS_MAG_IONS_PF from location:CAA/C1_CP_CIS-HIA_PAD_HS_MAG_IONS_PF*.cdf [critical: caa_load(130)] Did not succeed! Error loading: C1_CP_CIS_HIA_PAD_HS_MAG_IONS_PF [warning: caa_load(136)] CAA_LOAD : nothing to load [warning: c_caa_var_get(186)] C1_CP_CIS_HIA_PAD_HS_MAG_IONS_PF could not be loaded! [warning: c_caa_var_get(249)] Nothing is loaded

idpf1 =

[]

idpf1=irf_get_data('Differential_Particle_Flux__C1_CP_CIS-HIA_PAD_HS_MAG_IONS_PF','caa','mat') [warning: caa_load(119)] loading C1_CP_CIS_HIA_PAD_HS_MAG_IONS_PF from location:CAA/C1_CP_CIS-HIA_PAD_HS_MAG_IONS_PF*.cdf

idpf1 =

t: [4715x1 double]
dep_x: {[1x1 struct]  [1x1 struct]}
data: [4715x16x31 single]
   dt: [1x1 struct]

Love

— Reply to this email directly or view it on GitHubhttps://github.com/irfu/irfu-matlab/issues/10#issuecomment-37812215 .

LoveAlm commented 10 years ago

Did a clean re-install but it didn't help. The error has "mutated" and offers a bit more information this time around.

edpf1=irf_get_data(tint2,'Data__C1_CP_PEA_PITCH_SPIN_DPFlux','caa','mat')
  [warning: caa_load(119)] loading C1_CP_PEA_PITCH_SPIN_DPFlux from location:C1_CP_PEA_PITCH_SPIN_DPFlux\*.cdf
Index exceeds matrix dimensions.

Error in dataobj/getmat (line 75)
        dt.plus=deltaplus.data(1,:);

Error in c_caa_var_get (line 227)
            resmat{iVar}=getmat(Dataobject,varName);

Error in irf_get_data (line 75)
  f=c_caa_var_get(parameter,format,'tint',tint);

Love

vaivads commented 10 years ago

v1.5.3 released after checking with CAA on the way to treat variables with delta_plus and delta_minus. sorry for long delays in fixing this bug.

On Wed, Mar 19, 2014 at 9:47 AM, LoveAlm notifications@github.com wrote:

Did a clean re-install but it didn't help. The error has "mutated" and offers a bit more information this time around.

edpf1=irf_get_data(tint2,'Data__C1_CP_PEA_PITCH_SPIN_DPFlux','caa','mat') [warning: caa_load(119)] loading C1_CP_PEA_PITCH_SPIN_DPFlux from location:C1_CP_PEA_PITCH_SPIN_DPFlux*.cdf Index exceeds matrix dimensions.

Error in dataobj/getmat (line 75) dt.plus=deltaplus.data(1,:);

Error in c_caa_var_get (line 227) resmat{iVar}=getmat(Dataobject,varName);

Error in irf_get_data (line 75) f=c_caa_var_get(parameter,format,'tint',tint);

Love

— Reply to this email directly or view it on GitHubhttps://github.com/irfu/irfu-matlab/issues/10#issuecomment-38028377 .

LoveAlm commented 10 years ago

I have confirmend that the issue has been resolved for the following datasets: C?_JP_AUX_PMP C?_JP_PMP C?_CP_PEA_PITCH_FULL_D?Flux C?_CP_PEA_PITCH_SPIN_D?Flux C?_CP_FGM_5VPS C?_CP_FGM_FULL C?_CP_WHI_ELECTRON_DENSITY

The issue has been seen in the following datasets: C?_CP_AUX_POSGSE_1M C?_CP_EFW_L3_P C?_CP_EFW_L3_E3D_INERT C?_CP_EFW_L2_E3D_INERT C?_CP_CIS-HIA_HS_MAG_IONS_PSD C?_CP_CIS-HIA_PAD_HS_MAG_IONS_PF

It would appear that the issue is instrument specific since there is no case of only one specific dataset from an instrument working properly.

vaivads commented 10 years ago

v1.5.4 released. The issue was still present in those datasets that had DELTA_PLUS and DELTA_MINUS specifying values and not variable names. Now this should be fixed.

On Mon, Mar 24, 2014 at 11:00 AM, LoveAlm notifications@github.com wrote:

I have confirmend that the issue has been resolved for the following datasets: C?_JP_AUX_PMP C?_JP_PMP C?_CP_PEA_PITCH_FULL_D?Flux C?_CP_PEA_PITCH_SPIN_D?Flux C?_CP_FGM_5VPS C?_CP_FGM_FULL C?_CP_WHI_ELECTRON_DENSITY

The issue has been seen in the following datasets: C?_CP_AUX_POSGSE_1M C?_CP_EFW_L3_P C?_CP_EFW_L3_E3D_INERT C?_CP_EFW_L2_E3D_INERT C?_CP_CIS-HIA_HS_MAG_IONS_PSD C?_CP_CIS-HIA_PAD_HS_MAG_IONS_PF

It would appear that the issue is instrument specific since there is no case of only one specific dataset from an instrument working properly.

— Reply to this email directly or view it on GitHubhttps://github.com/irfu/irfu-matlab/issues/10#issuecomment-38427077 .

LoveAlm commented 10 years ago

That did the trick. Thanks for the help.

Love