Skip to content
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

implement BREAKPOINT #425

Closed
slayoo opened this issue Jul 17, 2018 · 71 comments
Closed

implement BREAKPOINT #425

slayoo opened this issue Jul 17, 2018 · 71 comments
Assignees

Comments

@slayoo
Copy link
Member

slayoo commented Jul 17, 2018

https://www.harrisgeospatial.com/docs/BREAKPOINT.html

@slayoo
Copy link
Member Author

slayoo commented Aug 4, 2018

Posting here the recent message from SF.net discussion by cosmicbruce:

Dear Alain and developer community:

I don't find any of (colon operator, *gen keyword, implicit print, issues) important for my use, nor do I know others who extensively use it. But it is in simple examples in on-line materials now, so might be good to address this.

breakpoint, on the other hand, is really valuable.

My recommendations (for what they are worth):

  • Fix colon operator, findgen, indgen,.. keywords, implicit print issues -----------> Zero Allocation of Resources (live with it)

    Publish above as "gdl / idl incompatibility issues" -----> Worth doing: Put on the net where it can be found with a detailed search in < 1 minutes of work. Later, when someone has time, make a nice, as complete as possible list of incompatibilities- this would be a valuable reference.

    Breakpoint: I feel this is in a different category entirely. For me, IDL / gdl power is strictly and only live-time debugging. For example, the command ".skip", as far as I can tell, is completely unique among all languages I've heard of. So, enhancing such capabilities is important to keeping gdl relevant.

I would say .step is a basic building block of live-time debugging. Breakpoint allows one to precisely apply .step in a very long program. So, to me, the live-time debugging capabilities of gdl will take a significant step up if this is implemented.
--------->I would humbly request developers please consider working on this.

Example: you are not sure if some error in the answer comes from the statement in line 50 of your code, or line 350 or 550. You can easily look in your editor and note these linenumbers, and apply breakpoint. But you have to count statements, not line numbers, to use .step. If there are some 150 statements or so between locations where you want to stop and look at values, .step is not practical because of the inconvenience of converting the number of statements (required by .step) to line numbers (that you see in your editor). Without breakpoint, you need to add stop statements, which you have to remove again later, re-compile, and re-run. So, breakpoint is much faster, more interactive, and more convenient.,

IDLwave does work with gdl, but of course, you can't use it's nice button for the breakpoint statement. So, increased compatibility with IDLwave will also result.

Thanks,

-Bruce

@GillesDuvert
Copy link
Contributor

indeed, .breakpoint and .stepover, (along with correct behaviour of CHECK_MATH() ) is desirable. But as GDL is firstly made to run IDL "proven" code, this is not yet in our radar...

@rschwartz70
Copy link

I stopped trying to use GDL because it would fail on proven IDL code and without breakpoint it has proven to difficult to isolate the problems.

@GillesDuvert
Copy link
Contributor

Indeed. I probably misused the term "proven". Nevertheless, it would be useful to signal what code fails to run with GDL. My experience is that a few "stop" added in a procedure are sufficient to identify where the problem is. Cumbersome, certainly, but useful as once the problem is solved, it is solved everywhere. This is a worthy contribution.

@rschwartz70
Copy link

GDL has proven to be a moving target with my RHESSI code. I have had code break that worked in earlier versions. And I have tried many times reducing the problem and spending so much time using stop and step. Knowing that you have no interest in breakpoint makes my decisions simpler as I had been waiting for it. I don't normally work in Linux so making the current build with all of the features on a virtual machine again adds time. Maybe I'll return to it again but for now I'm more hopeful about the Fawlty implementation in Windows.

@alaingdl
Copy link
Contributor

alaingdl commented Oct 1, 2018

Hi,

I worked on that code with @rschwartz70 long time ago, and yes we had a severe problem. And yes I never succeed to catch it or even located it 😱

For sure it is time to go back on it. And we learn a lot, may be we can go quickly to the source of the problem ?

But conversely I also have few examples where GDL help to improve IDL "proven" codes, in quality (see change in BESEL behavior in IDL ...) or in speed or in numerical accuracy (see INTERPOLATE 8.2.3 | Added DOUBLE keyword.) We also show that some numerical code are not good in IDL in some case (please run test_qromo with IDL, I have also an example in SVDV).

@GillesDuvert
Copy link
Contributor

If we stick to the trail "GDL should run proven existing code" (somewhat a second choice dictated by the paucity of serious contributors) then as stated above it would be cumbersome, but useful for all, to make yet another "proven" code (here RHESSI) work with GDL.

@rschwartz70
Copy link

Please let me know if you implement breakpoint. I have broken this code down looking for a place to stop but the code in which it stops is highly re-entrant which is why using STOP is too frustrating. The next generation here at GSFC is determined to become Python enabled and we are exporting data products from RHESSI to reduce any dependence on legacy code. My interest now is more academic in getting GDL to work.

@GillesDuvert
Copy link
Contributor

Hi,
I've installed RHESSI and a first glimpse found a bug in (very probably) ptr-valid() while calling 'hessi'.
Already a positive return, even if it is a bug.
I'll find probably more if I had a few simple rhessi commands associated with infos to what data to retrieve and use ( sorry but the documentation apparently lacks test examples?)
@acoulais and @rschwartz70 may have some suggestions.

@rschwartz70
Copy link

Have you installed the RHESSI software including environment variables? Assuming that you have, I'll prepare a script that unpacks the Level 0 files and returns our eventlist data structure. If that succeeds, the script will produce a backprojection image.

@rschwartz70
Copy link

;pro test
im=hsi_bproj(obs_time='20-feb-02 '+['11:06:00','11:06:30'], energy_band=[6.,25],
imtest_image
time_range=[0,34] )
evd = im->getdata(class='hsi_eventlist')
help, evd
help, evd[0]
help, evd[300000L]

;IDL> help, evd
;EVD STRUCT = -> HSI_EVENT Array[326079]
;IDL> help, evd,/st
;** Structure HSI_EVENT, 4 tags, length=16, data length=12:
;TIME LONG64 606
;A2D_INDEX BYTE 10
;CHANNEL INT 103
;COINCID_MASK BYTE 0
;IDL> help, evd[300000L],/st
;** Structure HSI_EVENT, 4 tags, length=16, data length=12:
;TIME LONG64 32402244
;A2D_INDEX BYTE 3
;CHANNEL INT 80
;COINCID_MASK BYTE 0
;
if ~(is_struct( evd ) && n_elements( evd ) eq 326079) then stop
obe = im->getdata(class='hsi_binned_eventlist')

print, ptr_valid( obe )
if total( ptr_valid( obe )) ne 9 then stop

cbe = im->getdata(class='hsi_calib_eventlist')
help, cbe
; CBE POINTER = Array[9]
print, ptr_valid( cbe )
; 0 0 0 1 1 1 1 1 0
help, *cbe[3],/st
; ** Structure HSI_CALIB_EVENT, 13 tags, length=52, data length=47:
; DX FLOAT 511.519
; DY FLOAT 94.3121
; ROLL_ANGLE FLOAT 222.275
; MODAMP FLOAT 0.638837
; PHASE_MAP_CTR FLOAT -81.5596
; GRIDTRAN FLOAT 0.262800
; FLUX_VAR FLOAT 0.522913
; BACKGROUND FLOAT 0.000000
; ATTEN_STATE INT 1
; TIME LONG 1024
; COUNT FLOAT 1.00000
; LIVETIME FLOAT 0.969837
; GAP BYTE 0
help, (*cbe[3])[100],/st
; ** Structure HSI_CALIB_EVENT, 13 tags, length=52, data length=47:
; DX FLOAT 564.878
; DY FLOAT 37.7588
; ROLL_ANGLE FLOAT 222.558
; MODAMP FLOAT 0.570661
; PHASE_MAP_CTR FLOAT -34.9453
; GRIDTRAN FLOAT 0.284218
; FLUX_VAR FLOAT 0.523372
; BACKGROUND FLOAT 0.000000
; ATTEN_STATE INT 1
; TIME LONG 205824
; COUNT FLOAT 0.000000
; LIVETIME FLOAT 0.000000
; GAP BYTE 1

if total(ptr_valid( cbe )) ne 5 then stop
map = im->getdata(time_range=fltarr(2))
if n_elements( map ) ne 65*67 then stop
help, map
; MAP FLOAT = Array[65, 67]
pmm, map
;-18071.0 60542.1
print, total(map)
;-5.99580e+006
print, map[30:34,30:34]
;37034.1 38887.2 37751.2 35123.0 32148.9
;44336.9 45514.1 43296.6 39464.5 35667.4
;49622.0 50187.1 46972.5 42288.6 38203.4
;53390.5 53368.6 49213.7 44085.2 39764.2
;56601.4 56017.4 51188.2 45452.9 40505.2
;
tvscl, congrid(map, 512,512)

set_plot, 'ps'
device,/color, bits=8, file = 'imtest_image.ps'
plot_image, map
device, /close
set_plot,'win
plot_image, map
WRITE_JPEG, 'imtest_image.jpg', TVRD(), QUALITY= 75
end

``

@rschwartz70
Copy link

Let me know if you succeed with that script to produce that image.

@rschwartz70
Copy link

rschwartz70 commented Jan 6, 2020 via email

@rschwartz70
Copy link

You'll need to enable the network search for the level 0 telemetry file
IDL> search_network
or I'll attach the file

@rschwartz70
Copy link

ftp://ftp.astro.gla.ac.uk/2002/02/20/hsi_20020220_104040_006.fits
is the data file needed to run this. I think it works in the local directory or in $HSI_DATA_ARCHIVE or $HSI_DATA_USER

@GillesDuvert
Copy link
Contributor

of course it fails now on IDLNETURL that is not in GDL.

[gildas@merbozo ~]$ sswidl
--------------------------------------------------------
Running SSW, Last Updated: Wed Nov 2 22:22:51 GMT 2005
 
PROBLEMS? - e-mail TO: freeland@penumbra.nascom.nasa.gov
--------------------------------------------------------

  GDL - GNU Data Language, Version 1.0.0-rc.1 git

- For basic information type HELP,/INFO
- Please report bugs, feature or help requests and patches at:
  https://github.com/gnudatalanguage/gdl

Executing SSW IDL_STARTUP for: GEN
% SET_OLDPATH: Ambiguous: Variable is undefined: FINDFILE or: Function not found: FINDFILE
Executing SSW IDL_STARTUP for: SITE
Executing SSW IDL_STARTUP: (Personal)
% PREF_SET: Unknown preference: IDL_RBUF_SIZE
% PREF_SET: Unknown preference: IDL_MORE
GDL> !PATH="/usr/local/share/gnudatalanguage/lib:"+!PATH
GDL> search_network
% Compiled module: SEARCH_NETWORK.
% Compiled module: MKLOG.
GDL> im=hsi_bproj(obs_time='20-feb-02 '+['11:06:00','11:06:30'], energy_band=[6.,25],time_range=[0,34] )           
% Compiled module: HSI_BPROJ.
% Compiled module: HSI_BPROJ__DEFINE.
% Compiled module: STRATEGY_HOLDER_PASSIVE__DEFINE.
% Compiled module: STRATEGY_HOLDER__DEFINE.
% Compiled module: STRATEGY_HOLDER_TOOLS__DEFINE.
% Compiled module: FRAMEWORK__DEFINE.
% Compiled module: HSI_MODUL_PATTERN.
% Compiled module: HSI_MODUL_PATTERN__DEFINE.
% Compiled module: HSI_CALIB_EVENTLIST.
% Compiled module: HSI_CALIB_EVENTLIST__DEFINE.
% Compiled module: HSI_XYOFFSET__DEFINE.
% Compiled module: HSI_FILEANDRAW__DEFINE.
% Compiled module: HSI_BINNED_EVENTLIST__DEFINE.
% Compiled module: HSI_SRM__DEFINE.
% Compiled module: CHECKVAR.
% Compiled module: HSI_SRM_INFO__DEFINE.
% Compiled module: HSI_SRM_CONTROL.
% Compiled module: HSI_SRM_CONTROL__DEFINE.
% Compiled module: ADMIN_CONTROL__DEFINE.
% Compiled module: FREE_VAR.
% Compiled module: STRUCTURE_MANAGER__DEFINE.
% Compiled module: SAME_DATA.
% Compiled module: SAME_DATA2.
% Compiled module: FRAMEWORK_GET_DEBUG.
% Compiled module: HSI_SPECTROGRAM__DEFINE.
% Compiled module: HSI_BINNED_EVENTLIST_INFO__DEFINE.
% Compiled module: HSI_SPECTROGRAM_INFO__DEFINE.
% Compiled module: HSI_OFFSET_GAIN_STR__DEFINE.
% Compiled module: HSI_BINNED_EVENTLIST_CONTROL.
% Compiled module: HSI_SPECTROGRAM_CONTROL.
% Compiled module: HSI_SPECTROGRAM_CONTROL__DEFINE.
% Compiled module: HSI_USE_SIM.
% Compiled module: HSI_BINNED_EVENTLIST_CONTROL__DEFINE.
% Compiled module: HSI_EVENTLIST.
% Compiled module: HSI_EVENTLIST__DEFINE.
% Compiled module: HSI_PACKET.
% Compiled module: HSI_PACKET__DEFINE.
% Compiled module: HSI_PACKET_CONTROL.
% Compiled module: HSI_PACKET_CONTROL__DEFINE.
% Compiled module: HSI_PACKET_INFO__DEFINE.
% Compiled module: IS_NUMBER.
% Compiled module: CHKTAG.
% Compiled module: NULL.
% Compiled module: IS_STRUCT.
% Compiled module: UNIQ.
% Compiled module: HSI_FITS__DEFINE.
% Compiled module: HSI_PACKET_FILE__DEFINE.
% Compiled module: SELECTION_MANAGER__DEFINE.
% Compiled module: HSI_PACKET_FILE_CONTROL.
% Compiled module: HSI_PACKET_FILE_CONTROL__DEFINE.
% Compiled module: HSI_PACKET_FILE_INFO__DEFINE.
% Compiled module: IS_NUMBER2.
% Compiled module: HSI_EVENTLIST_CONTROL__DEFINE.
% Compiled module: HSI_EVENTLIST_PACKET__DEFINE.
% Compiled module: HSI_EVENTLIST_STRATEGY__DEFINE.
% Compiled module: HSI_EVENTLIST_STRATEGY_INFO__DEFINE.
% Compiled module: HESSI_SCTIME_FULL__DEFINE.
% Compiled module: HSI_EVENTLIST_STRATEGY_CONTROL.
% Compiled module: HSI_EVENTLIST_STRATEGY_CONTROL__DEFINE.
% Compiled module: HSI_DATA_GAP_CONTROL__DEFINE.
% Compiled module: HSI_DP_CUTOFF__DEFINE.
% Compiled module: HSI_DP_EXTEND__DEFINE.
% Compiled module: HSI_DATA_GAP_CONTROL.
% Compiled module: HSI_DP_CUTOFF_CONTROL.
% Compiled module: HSI_DP_EXTEND_CONTROL.
% Compiled module: ANYTIM.
% Compiled module: STR_LASTPOS.
% Compiled module: STR2UTC.
% Compiled module: VALID_NUM.
% Compiled module: DELVARX.
% Compiled module: DELVARX2.
% Compiled module: DESTROY.
% Compiled module: BOOST_ARRAY.
% Compiled module: UTC2INT.
% Compiled module: TAG_EXIST.
% Compiled module: DATE2MJD.
% Compiled module: CHECK_INT_TIME.
% Compiled module: GET_LEAP_SEC.
% Compiled module: UTIME2STR.
% Compiled module: GETUTBASE.
% Compiled module: GETUT.
% Compiled module: INT2EX.
% Compiled module: DAYCNV.
% Compiled module: EX2INT.
% Compiled module: JDCNV.
% Compiled module: INT2SEC.
% Compiled module: HSI_OBS_SOURCE.
% Compiled module: HSI_OBS_SOURCE__DEFINE.
% Compiled module: HSI_OBS_SUMMARY__DEFINE.
% Compiled module: HSI_OBS_SUMMARY_CONTROL__DEFINE.
% Compiled module: HSI_OBS_SUMM_RATE__DEFINE.
% Compiled module: HSI_QLOOK__DEFINE.
% Compiled module: HSI_QLOOK_VERSION_CONTROL.
% Compiled module: HSI_QLOOK_CONTROL__DEFINE.
% Compiled module: DEFAULT.
% Compiled module: HSI_ASPECT_SOLUTION__DEFINE.
% Compiled module: HSI_ASPECT_SOLUTION_CONTROL.
% Compiled module: HSI_ASPECT_SOLUTION_CONTROL__DEFINE.
% Compiled module: HSI_USE_ASPECT_SIM.
% Compiled module: HSI_ASPECT_SOLUTION_INFO__DEFINE.
% Compiled module: HSI_AS_QUALITY__DEFINE.
% Compiled module: HSI_CALIB_EVENTLIST_CONTROL.
% Compiled module: HSI_CALIB_EVENTLIST_CONTROL__DEFINE.
% Compiled module: HSI_PHZ_STACKER_CONTROL__DEFINE.
% Compiled module: HSI_XYOFFSET_CONTROL__DEFINE.
% Compiled module: HSI_PHZ_STACKER_CONTROL.
% Compiled module: COPY_STRUCT.
% Compiled module: HSI_XYOFFSET_CONTROL.
% Compiled module: HSI_CALIB_EVENTLIST_INFO__DEFINE.
% Compiled module: HSI_MODUL_PATTERN_CONTROL.
% Compiled module: HSI_MODUL_PATTERN_CONTROL__DEFINE.
% Compiled module: HSI_MODUL_PATTERN_INFO__DEFINE.
% Compiled module: HSI_ANNSEC_PATTERN__DEFINE.
% Compiled module: HSI_MODUL_PATTERN_STRATEGY__DEFINE.
% Compiled module: HSI_ANNSEC_PATTERN_CONTROL.
% Compiled module: HSI_ANNSEC_PATTERN_CONTROL__DEFINE.
% Compiled module: HSI_MODUL_PATTERN_STRATEGY_CONTROL__DEFINE.
% Compiled module: HSI_MODUL_PATTERN_STRATEGY_CONTROL.
% Compiled module: HSI_ANNSEC_PATTERN_INFO__DEFINE.
% Compiled module: TAG_DEREFERENCE.
% Compiled module: STR_SUBSET.
% Compiled module: STR_TAGINFO.
% Compiled module: IS_NONZERO.
% Compiled module: HSI_BPROJ_INFO__DEFINE.
% Compiled module: FRAMEWORK_FIND_CLASS.
% Compiled module: ADD_TAG.
% Compiled module: MATCH_STRUCT.
% Compiled module: MATCH.
% Compiled module: EDGE_PRODUCTS.
% Compiled module: REPRODUCE.
% Compiled module: HSI_ENERGY_EDGE.
% Compiled module: GET_EDGES.
% Compiled module: TIMSTR2EX.
% Compiled module: HSI_FILEDB_FILENAME.
% Compiled module: HSI_GET_DEBUG.
% Compiled module: HSI_FILEDB_READ.
% Compiled module: HSI_MONTHLY_FILENAME.
% Compiled module: BREAK_FILE.
% Compiled module: INT2UTC.
% Compiled module: MJD2DATE.
% Compiled module: UTC2STR.
% Compiled module: TIME2FILE.
% Compiled module: LAST_ITEM.
% Compiled module: FILE2TIME.
% Compiled module: EXTRACT_FID.
% Compiled module: EXTRACT_FIDS.
% Compiled module: STRMIDS.
% Compiled module: STRSPECIAL.
% Compiled module: STRLASTCHAR.
% Compiled module: WC_WHERE.
% Compiled module: STRMATCH.
% Compiled module: LOC_FILE.
% Compiled module: TEST_OPEN.
% Compiled module: GET_FITS_EXTNO.
% Compiled module: FITS_OPEN.
% Compiled module: SXPAR.
% Compiled module: GETTOK.
% Compiled module: SXDELPAR.
% Compiled module: FITS_CLOSE.
% Compiled module: MRDFITS.
% Compiled module: FXPOSIT.
% Compiled module: FXMOVE.
% Compiled module: MRD_HREAD.
% Compiled module: FXPAR.
% Compiled module: MRD_SKIP.
% Compiled module: IDL_VALIDNAME.
% Compiled module: MRD_STRUCT.
% Compiled module: LMGR.
% Compiled module: HSI_FILEDB_VERSION_CONTROL.
% Compiled module: HSI_FILEDB__DEFINE.
% Compiled module: HSI_FILEDB_SORT.
% Compiled module: BSORT.
% Compiled module: FILE_BREAK.
% Compiled module: HSI_BPROJ_ANNSEC__DEFINE.
% Compiled module: HSI_BPROJ_STRATEGY__DEFINE.
% Compiled module: HSI_BPROJ_STRATEGY_CONTROL.
% Compiled module: HSI_BPROJ_STRATEGY_CONTROL__DEFINE.
% Compiled module: HSI_GRID_PARAMETERS.
% Compiled module: HSI_LOC_FILE.
% Compiled module: STR_EXPAND.
% Compiled module: GET_PATH_DELIM.
% Compiled module: FINDFILE.
This functionality is obsolete.
You are adviced to use FILE_SEARCH() instead.
% Compiled module: FCHECK.
% Compiled module: GET_RECENT_FILE.
% Compiled module: UNIQO.
% Compiled module: HSI_RD_GRID_PARM_TABLE.
% Compiled module: STR_SEP.
% Compiled module: HSI_GRID_PARAMETERS__DEFINE.
GDL> evd = im->getdata(class='hsi_eventlist')
% Compiled module: VALID_RANGE.
% Compiled module: HSI_FIND_FILE.
% Compiled module: HSI_FILE2DIR.
% Compiled module: HESSI_DATA_PATHS.
% Compiled module: GET_UNIQ.
% Compiled module: SSW_UNIQ.
% Compiled module: FIND_ALL_DIR.
% Compiled module: BREAK_PATH.
% Compiled module: PATH_SEP.
% Compiled module: CURDIR.
% Compiled module: CHECK_NETWORK.
% Compiled module: ALLOW_SOCKETS.
% Compiled module: HSI_SOCK_COPY.
% Compiled module: HSI_SOCK_SERVER.
% Compiled module: STRUP.
% Compiled module: UT_DIFF.
% Compiled module: SYSTIM.
% Compiled module: HAVE_NETWORK.
% Compiled module: URL_FIX.
% Compiled module: HAS_URL_SCHEME.
% Compiled module: URL_PARSE.
% Compiled module: SOCK_CHECK.
% Compiled module: SOCK_HEAD.
% Compiled module: IS_URL.
% Compiled module: IS_FTP.
% Compiled module: IS_SSL.
% Compiled module: IDLNETURL2__DEFINE.
% IDLNETURL2__DEFINE: Procedure not found: IDLNETURL__DEFINE
% Execution halted at: IDLNETURL2__DEFINE   257 /home/gildas/PACKAGES/ssw/gen/idl/objects/idlneturl2__define.pro
%                      SOCK_HEAD           99 /home/gildas/PACKAGES/ssw/gen/idl/atest/sock_head.pro
%                      SOCK_CHECK          43 /home/gildas/PACKAGES/ssw/gen/idl/atest/sock_check.pro
%                      HAVE_NETWORK       118 /home/gildas/PACKAGES/ssw/gen/idl/atest/have_network.pro
%                      HSI_SOCK_SERVER     97 /home/gildas/PACKAGES/ssw/hessi/idl/gen/hsi_sock_server.pro
%                      HSI_SOCK_COPY       41 /home/gildas/PACKAGES/ssw/hessi/idl/gen/hsi_sock_copy.pro
%                      HSI_FIND_FILE      218 /home/gildas/PACKAGES/ssw/hessi/idl/atest/hsi_find_file.pro
%                      HSI_PACKET_FILE::PROCESS   818 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_packet_file__define.pro
%                      HSI_PACKET_FILE::SELECT   320 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_packet_file__define.pro
%                      SELECTION_MANAGER::GETSELECTION   111 /home/gildas/PACKAGES/ssw/gen/idl/objects/framework/selection_manager__define.pro
%                      HSI_PACKET_FILE::GETDATA   539 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_packet_file__define.pro
%                      HSI_PACKET::GETDATA   180 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_packet__define.pro
%                      HSI_EVENTLIST_PACKET::PROCESS_HOOK   359 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_eventlist_packet__define.pro
%                      HSI_EVENTLIST_STRATEGY::PROCESS   508 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_eventlist_strategy__define.pro
%                      FRAMEWORK::GETDATA   838 /home/gildas/PACKAGES/ssw/gen/idl/objects/framework/framework__define.pro
%                      HSI_EVENTLIST_STRATEGY::GETDATA   418 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_eventlist_strategy__define.pro
%                      HSI_EVENTLIST_PACKET::GETDATA   256 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_eventlist_packet__define.pro
%                      STRATEGY_HOLDER_TOOLS::GETDATA   331 /home/gildas/PACKAGES/ssw/gen/idl/objects/framework/strategy_holder_tools__define.pro
%                      HSI_EVENTLIST::GETDATA   323 /home/gildas/PACKAGES/ssw/hessi/idl/util/hsi_eventlist__define.pro
%                      FRAMEWORK::GETDATA   814 /home/gildas/PACKAGES/ssw/gen/idl/objects/framework/framework__define.pro
%                      STRATEGY_HOLDER_TOOLS::GETDATA   315 /home/gildas/PACKAGES/ssw/gen/idl/objects/framework/strategy_holder_tools__define.pro
%                      $MAIN$ 

@rschwartz70
Copy link

rschwartz70 commented Jan 6, 2020 via email

@GillesDuvert
Copy link
Contributor

with the file in local, I can go further of course. Here the errors sections only:

GDL> obe = im->getdata(class='hsi_binned_eventlist')
% Compiled module: JOIN_STRUCT.
% Compiled module: HESSI_CONSTANT__DEFINE.
% Compiled module: GT_TAGVAL.
% Compiled module: STR_TAGVAL.
% Compiled module: TAG_INDEX.
% Compiled module: EDGE2BIN.
% Compiled module: F_DIV.
% Compiled module: POLY.
% Compiled module: ERR_STATE.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% Compiled module: PTR_EXIST.
% HSI_SPECTROGRAM::PROCESS: Tag name: REGROUP is undefined for STRUCT.
% Execution halted at: HSI_SPECTROGRAM::PROCESS   777 /home/gildas/PACKAGES/ssw/hessi/idl/atest/hsi_spectrogram__define.pro
%                      FRAMEWORK::GETDATA   838 /home/gildas/PACKAGES/ssw/gen/idl/objects/framework/framework__define.pro
%                      HSI_BINNED_EVENTLIST::GETDATA   461 /home/gildas/PACKAGES/ssw/hessi/idl/atest/hsi_binned_eventlist__define.pro
%                      FRAMEWORK::GETDATA   814 /home/gildas/PACKAGES/ssw/gen/idl/objects/framework/framework__define.pro
%                      STRATEGY_HOLDER_TOOLS::GETDATA   315 /home/gildas/PACKAGES/ssw/gen/idl/objects/framework/strategy_holder_tools__define.pro
%                      $MAIN$   
  • this is probably a bug*

GDL> cbe = im->getdata(class='hsi_calib_eventlist')

% Compiled module: STR_INDEX.
% INTERPOL: QUADRATIC keyword not supported yet (FIXME!)
% Error occurred at: INTERPOL            50 /usr/local/share/gnudatalanguage/lib/interpol.pro

and
GDL> map = im->getdata(time_range=fltarr(2))

PMTRAS_ANALYSIS: Using roll solution database.
% INTERPOL: QUADRATIC keyword not supported yet (FIXME!)
% Error occurred at: INTERPOL            50 /usr/local/share/gnudatalanguage/lib/interpol.pro

OK, Interpol SHOULD provide quadratIc --- GDL people have a tendency to leave things unfinished, do not they?

When ignoring the Interpol issue, we finally end on

GDL> map = im->getdata(time_range=fltarr(2))
This functionality is obsolete.
You are adviced to use FILE_SEARCH() instead.
% INTERPOL: QUADRATIC keyword not supported yet (FIXME!)
% INTERPOL: QUADRATIC keyword not supported yet (FIXME!)
% Compiled module: HSI_ASPECT_SOLUTION::POINTING_ERROR.
% Compiled module: HSI_AS_DELTAPOL.
% Compiled module: HSI_RADIAL_COORD.
% Compiled module: STDEV.
% Compiled module: HSI_TIME_BIN_AUTO.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% ADD_TAG: BaseGDL::Assign(...) called.
% HSI_SPECTROGRAM::PROCESS: Tag name: REGROUP is undefined for STRUCT.
% Execution halted at: HSI_SPECTROGRAM::PROCESS   777 /home/gildas/PACKAGES/ssw/hessi/idl/atest/hsi_spectrogram__define.pro

Which goes back to the bug seen before.

@rschwartz70
Copy link

rschwartz70 commented Jan 6, 2020 via email

@GillesDuvert
Copy link
Contributor

Screenshot_20200108_184322

@GillesDuvert
Copy link
Contributor

This little exercise permitted to find and cure 3 GDL bugs 😄

@GillesDuvert
Copy link
Contributor

see #699

@GillesDuvert
Copy link
Contributor

needs however to compile IDL's interpol.pro as GDL's do not support the QUADRATIC option.
on my machine, im=hsi_bproj() takes 0.2 s when procedures are already compiled.
im->getdata() takes 30 seconds
(probably very slow, this is interesting as we may find the culprit code for this slowness)
and complains a lot about:

% VALUE_LOCATE: Warning : input array is NOT monotonically increasing or decreasing
% Input conversion error.
% Input conversion error.

Probably yet another GDL 'feature'.

@rschwartz70
Copy link

rschwartz70 commented Jan 8, 2020 via email

@rschwartz70
Copy link

rschwartz70 commented Jan 8, 2020 via email

@GillesDuvert
Copy link
Contributor

Good point. It concerns some 'X' values passed to this function by IDL's interpol.pro, used, e.g., in
cbe = im->getdata(class='hsi_calib_eventlist')
The warning itself exists only in GDL's version of value_locate() ad has been added by @acoulais, a useful addition in retrospect.
However it must be said that numerical results are not entirely identical between IDL and GDL on this example. This may be due to absent files, as I see:

% HSI_QLOOK::GETDATA: No Files Found
% HSI_SPECTROGRAM::GET_OBS: Could not find observing summary data
% HSI_DECIMATION_ANOMALY: No Decimation before 19-mar-2002 05:58
% HSI_DECIMATION_ANOMALY: Rsetting Idpu_version to 0 for 2 packets
% HSI_QLOOK::GETDATA: file: hsi_obssumm_20020220_154.fits NOT found
% HSI_QLOOK::GETDATA: Searching For Old versions

@jeget
Copy link

jeget commented Feb 28, 2023

Hello everyone! I have an issue with hessi, so I decided to report it here due to the discussion above.
I installed gdl-1.0.2. The configuration is as follows

GDL - GNU DATA LANGUAGE [Standalone]
System                 Linux-5.19.0-32-generic
Files generated        Unix Makefiles
Installation prefix    /home/bulat/gdl/install
C++ compiler           /usr/bin/c++ -O3 -DNDEBUG

-- Options

Interactive plots: ON
Widgets support: TRUE

OpenMP support         ON (flag: -fopenmp)
WxWidgets              ON (libs:-L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_baseu-3.0;-lwx_gtk3u_core-3.0;-lwx_gtk3u_adv-3.0; headers:/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0;/usr/include/wx-3.0)
GRAPHICSMAGICK         ON (libs:/usr/lib/libGraphicsMagick.so;/usr/lib/libGraphicsMagick++.so; headers:/usr/include/GraphicsMagick)
TIFF                   ON (libs:/usr/lib/x86_64-linux-gnu/libtiff.so; headers:/usr/include/x86_64-linux-gnu)
GeoTIFF                ON (libs:/usr/lib/x86_64-linux-gnu/libgeotiff.so; headers:/usr/include/geotiff)
NetCDF                 ON (libs:netcdf; headers:/usr/include/hdf5/serial)
HDF4                   ON (libs:/usr/lib/libmfhdfalt.so;/usr/lib/libdfalt.so;z;/usr/lib/x86_64-linux-gnu/libjpeg.so; headers:/usr/include/hdf)
HDF5                   ON (libs:/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;/usr/lib/x86_64-linux-gnu/libcurl.so;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/libm.so; headers:/usr/include/hdf5/serial)
FFTW                   ON (libs:/usr/lib/x86_64-linux-gnu/libfftw3.so;/usr/lib/x86_64-linux-gnu/libfftw3f.so; headers:/usr/include)
MPI                    OFF
PROJ                   ON (libs:/usr/lib/x86_64-linux-gnu/libproj.so; headers:/usr/include)
Python                 OFF
UDUNITS-2              ON (libs:/usr/lib/x86_64-linux-gnu/libudunits2.so; headers:/usr/include)
EIGEN3                 ON (libs:; headers:/home/bulat/lib/eigen-3.4.0)
GRIB                   ON (libs:/usr/lib/x86_64-linux-gnu/libeccodes.so; headers:/usr/include/x86_64-linux-gnu)
QHULL                  ON (libs:/usr/lib/x86_64-linux-gnu/libqhullcpp.so;/usr/lib/x86_64-linux-gnu/libqhullstatic_r.a; headers:/usr/include)
GLPK                   ON (libs:/usr/lib/x86_64-linux-gnu/libglpk.so; headers:/usr/include)
SHAPELIB               ON (libs:/usr/lib/x86_64-linux-gnu/libshp.so; headers:/usr/include)
EXPAT                  ON (libs:/usr/lib/x86_64-linux-gnu/libexpat.so; headers:/usr/include)
Xlib                   OFF
libpng                 ON (libs:/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libz.so; headers:/usr/include;/usr/include)

-- Mandatory modules
Plplot                 ON (libs:/home/bulat/lib/plplot-5.15.0/build/lib/libplplot.so;/home/bulat/lib/plplot-5.15.0/build/lib/libplplotcxx.so; headers:/home/bulat/lib/plplot-5.15.0/build/include)
GNU Readline           ON (libs:/usr/lib/x86_64-linux-gnu/libreadline.so;/usr/lib/x86_64-linux-gnu/libhistory.so; headers:/usr/include)
GSL                    ON (libs:/usr/lib/x86_64-linux-gnu/libgsl.so;/usr/lib/x86_64-linux-gnu/libgslcblas.so; headers:/usr/include)
Zlib                   ON (libs:/usr/lib/x86_64-linux-gnu/libz.so; headers:/usr/include)
(N)curses              ON (libs:/usr/lib/x86_64-linux-gnu/libncurses.so;/usr/lib/x86_64-linux-gnu/libform.so; headers:/usr/include)
RPC                    ON (libs:/usr/lib/x86_64-linux-gnu/libtirpc.so; headers:/usr/include/tirpc)

GDLDEV mode: OFF (use -DGDLDEV=ON to enable work-in-progress tests)

==========================================================================
== WARNING !!        {Ana|mini|}conda activated env. detected !         ==
== To avoid possible conflicts between local libs. and the sytem libs,  ==
== we advice you to remove Conda related paths from you $PATH           ==
== or run this CMake file in a clean terminal without Conda Env.        ==
==========================================================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/bulat/gdl/build

One test failed

The following tests did not run:
	131 - test_mpi.pro (Skipped)
	150 - test_python.pro (Skipped)

The following tests FAILED:
	103 - test_hdf5.pro (Failed)

I installed SolarSoftware and ran hessi. I got an error:

Compiled module: LINECOLORS.
% INTERPOLATE: Number of parameters must agree with dimensions of argument.
% Error occurred at: CONGRID            128 /home/bulat/gdl/install/share/gnudatalanguage/lib/congrid.pro
%                    LINECOLORS         283 /home/bulat/ssw/gen/idl/display/linecolors.pro
%                    HESSI_SPLASH        24 /home/bulat/ssw/hessi/idl/widgets/hessi_splash.pro
%                    HESSI              760 /home/bulat/ssw/hessi/idl/widgets/hessi.pro
%                    $MAIN$          
% Execution halted at: LINECOLORS         283 /home/bulat/ssw/gen/idl/display/linecolors.pro

When I run o=ospex() which also starts a widget, I get the same error. What can it be?
The test script provided by Richard failed, too, but the error comes from ssw code, so I'm not sure it is because of gdl.

@GillesDuvert
Copy link
Contributor

Hi, I have some difficulties to restart hessi from the state iI left it in 2020. My, time passes.
Wonder how sswidl will have improved with all the changes in GDL since that time... I probably need to reinstall from scratch.
Concerning your problem, it looks as if LINECOLORS calls CONGRID that somehow passes too much or too many arguments to INTERPOLATE. This may be a GDL bug in INTERPOLATE or above.
As it is in the splash screen of hessi maybe not showing the splash screen will bring you farther (if there is a preference somewhere to not display a splash screen)
Can you make a listing of all the commands you entered until the problem appears?

@GillesDuvert
Copy link
Contributor

I confirm, running o=ospex() here produces the same error.

@GillesDuvert
Copy link
Contributor

congrats, you found a bug. (for GDL developers: GDL has a problem with 'shallow' dimensions (dimension that ==1).

@GillesDuvert
Copy link
Contributor

Will be solved. In the meantime pls patch GDL's congrid.pro procedure using the patch below:

--- old/congrid.pro     2023-03-01 17:12:11.822797081 +0100
+++ new/congrid.pro     2023-03-01 17:12:02.621876428 +0100
@@ -66,7 +66,6 @@
     print,'   the pixel at (0,[0,[0]]) is clipped to 1/4 size.'
     print,'   Default is that pixel start (not center) is at index.'
     print,'   CUBIC=cubic: use a cubic interpolation. -0 to -1. -0.5 is recommended.'
-    print,'   /MINUS_ONE: option will be ignored. MISSING can be used instead.'
     print, '  /HELP gives this help.'
     print,' NOTE: CONGRID performs a resampling. Does not conserve Fluxes.'
     return,''
@@ -76,6 +75,11 @@
 ;
 ndim = SIZE(t, /N_DIMENSIONS)
 dims = SIZE(t, /DIMENSIONS)
+; remove spurious dimensions 1:
+while dims[ndim-1] eq 1 do begin
+   ndim--
+   dims=dims[0:-2]
+endwhile
 ;
 if(ndim EQ 0) then MESSAGE, 'Array must have 1, 2, or 3 dimensions.'
 if(ndim gt 3) then $

@GillesDuvert
Copy link
Contributor

You'll probably find next that the ospex widget(s) need maybe to be resized at hand.

@GillesDuvert
Copy link
Contributor

@jeget We are interested in having a contact with the hessi / ssw IDL people, as this sswidl is a full-scale test of GDL.
Apparently the ssw idl code is already recognising GDL, but there are some tweaks to apply to make it run out of the box. For example, sswidl users need to add the gdl natural !PATH to the sswidl !PATH:
!PATH=!PATH+':'+expand_path('+/usr/local/share/gnudatalanguage/lib') at start of session.
Plus at least one other patch in ~/PACKAGES/ssw/gen/idl/util/where_within.pro (for the record, suggested patch below)
Perhaps you know whom to contact?

If @rschwartz70 read this please comment.

--- /home/ssw/gen/idl/util/where_within.pro~    2012-02-27 17:54:59.000000000 +0100
+++ /home/ssw/gen/idl/util/where_within.pro     2023-03-01 16:31:16.493952154 +0100
@@ -68,7 +68,7 @@
        return, -1
 endif
 
-nint = dimrange[1]
+nint = n_elements(inrange[0,*])  
 
 bad_ind = where  (inrange[0,*] lt valid_range[0] or $
                        inrange[0,*] gt valid_range[1] or $

@jeget
Copy link

jeget commented Mar 1, 2023

Gilles, thanks for such a quick response! I introduced the patches to congrid and where_within, this helped. hessi seems to search the data, but does not show the plot. The output ends with

% Compiled module: MARK_INTERVALS.
% Compiled module: CRANGE.
% Compiled module: F_DIV.
% Compiled module: LABEL_LINE.
% Compiled module: USERLABEL.
% Compiled module: PLOTMAN_STORESYS.
% Compiled module: PLOTMAN::GET_YLOC.

Normally, after that the plot appears in the hessi widget, but it is empty. When I try to resize the widget with the mouse, it does not with the message

% Compiled module: PLOTMAN_WINDOW_CONTROL_EVENT.
% Compiled module: XHIDE.
panel =            0  panel desc = HESSI Count Rate 12-Feb-2002 02:13:24 (01:56:59)
% Compiled module: XSHOW.
% Warning: Keyword parameter ICONIFY not supported in call to: WIDGET_CONTROL. Ignored.

I changed the path in the startup file. Since standard functions are compiled, I suppose I did it correctly:) Thanks for this comment, too.
I'll try the command line interface. It is possible to do things without graphics, at least to check functionality.

@jeget
Copy link

jeget commented Mar 1, 2023

Oh God... I just found out that Richard Schwartz @rschwartz70 passed away in December 2020.
Gilles, I don't know SSW developers personally, but some of my colleagues may know. I'll ask them.

@GillesDuvert
Copy link
Contributor

GillesDuvert commented Mar 2, 2023

Oh what a pity, please pass my sincere condolences.

Indeed, plottings are absent --- they were present, as seen above, on Feb 5,2020 ☹️
There has been a huge revamping of the widgets since, not all consequences have been found. With your report, the days with an absence of plot in sswidl are now counted.

@GillesDuvert
Copy link
Contributor

@jeget concerning the absence of plots, GDL has indeed a bug, to be cured soon.
At the moment you can comment out line 898 of src/widget.cpp such:
//if ( e->KeywordPresent( mapIx ) ) if ( !e->KeywordSet( mapIx ) ) mapWid = false;
and voila!
Provided you rebuild GDL from current GH sources of course.

@GillesDuvert
Copy link
Contributor

plotting problems of plotman object in sswidl are solved by #1532

@GillesDuvert
Copy link
Contributor

BTW, not so easy to ... implement BREAKPOINT
Especially as it does not work so well with IDL too...

@jeget
Copy link

jeget commented Mar 7, 2023

@GillesDuvert Thank you, I introduced these patches. Now plots appear. I continued experimenting. New issues are as follows.
When I hit the button 'Set Obs Time' in hessi, sometimes it does not react, sometimes I get

Compiled module: HSI_UI_SETLABELS.
% STRTOK: Variable is undefined: STRIN
% Error occurred at: STRSPLIT            92 /home/bulat/gdl/install/share/gnudatalanguage/lib/strsplit.pro
%                    HSI_UI_SETLABELS    61 /home/bulat/ssw/hessi/idl/widgets/hsi_ui_setlabels.pro
%                    HSI_CW_UT_RANGE_EVENT   334 /home/bulat/ssw/hessi/idl/atest/hsi_cw_ut_range.pro
%                    HSI_CW_UT_RANGE_EVENT   334 /home/bulat/ssw/hessi/idl/atest/hsi_cw_ut_range.pro
%                    $MAIN$          
% Execution halted at: HSI_UI_SETLABELS    61 /home/bulat/ssw/hessi/idl/widgets/hsi_ui_setlabels.pro

I already encountered this error when attempting to cope with previous issues. I added help, oldlabel to the line 60 of hsi_ui_setlabels.pro, and oldlabel is undefined somehow. In IDL, it contains a string Working Time Interval 17-Feb-2013... etc. (the interval I set in the widget). Also IDL seems to call hsi_ui_setlabels.pro each second. I.e. even if I only type hessi and nothing else, it starts to output that help,oldlabel each second. This is not the case with GDL. Maybe this could change, my two versions of SSW are different.

Also, when I try to zoom in the plot by click-and-drag, I get

% Compiled module: PLOTMAN_DRAW_EVENT.
% Compiled module: PLOTMAN_ZOOM.
% Compiled module: STRETCH_BOX.
Unknown user value in plotman = 
Unknown user value in plotman = 
Unknown user value in plotman = 

with new lines Unknown user value in plotman = appearing whenever I move my mouse. And this completely hangs GDL, I can only kill the process.

Regarding SSW people, my colleague said the head developer is Samuel Freeland, his email is in the bottom of SSW page. hessi has been developed mainly by Richard Schwartz and Kim Tolbert. Here is Kim's ResearchGate page. My colleague knows (more closely) Andrew Inglis, another hessi contributor. He said he can write to him, but asks what exactly to write. Or, probably, you can contact these people directly to avoid signal distortion, so to say.

@GillesDuvert
Copy link
Contributor

Hi, thanks for all that information.
Let's pursue this code hunting. It permitted me to find huge (at the beginning, with R. Schwartz) deficiencies in GDL (including speed issues) and we are now with your reports close IMHO to a decent support of sswidl by GDL.
All the code changes I could think of and wanted to suggest to an ssw developer are in fact a GDL "problem" in the sense GDL should mimic IDL even when it's behaviour is, ahem, strange. See #1537 , that's why I suggest a change to where_within () above, but in fact it is GDL that must adapt. Probably when #1527 is cured, many other strange behaviours of sswidl will disappear. This should not take long.

@jeget
Copy link

jeget commented Mar 7, 2023

OK, that's good news, thanks!

@GillesDuvert
Copy link
Contributor

OK, now there are no errors for ospex() or the test above, using out-of-the-box sswidl (giving the GDL !PATH at start of course:)
!PATH=expand_path('+/usr/local/share/gnudatalanguage/lib')+':'+!PATH
The only tiny little annoying thing is that the results are ZERO and the plots EMPTY. 😢
.fits files are apparently well transmitted (using search_network, /enable )

@GillesDuvert
Copy link
Contributor

I would appreciate somebody at ease with hessi to at least hint why obe.count is systematically zero, which is the reason why GDL does not plot anything. the test code is:

im=hsi_bproj(obs_time='20-feb-02 '+['11:06:00','11:06:30'], energy_band=[6.,25],time_range=[0,0.0001] )
obe = im->getdata(class='hsi_binned_eventlist')
print, (*obe[3]).count

(*obe[3]).count should be 2.65722

at the bare minimum: what is the procedure where this count is computed ?

@jeget
Copy link

jeget commented Mar 10, 2023

Strange, but I can only run the first line of the test. The second one brings an error

% Compiled module: HSI_DECIM_CORRECTION.
% HSI_DECIM_CORRECTION: Scalar subscript out of range [>]: (1)  Aborting decimation correction.
% Execution halted at: HSI_DECIM_CORRECTION    84 /home/bulat/ssw/hessi/idl/spectra/hsi_decim_correction.pro
%                      HSI_SPECTROGRAM::DECIM_TABLE  2470 /home/bulat/ssw/hessi/idl/spectra/hsi_spectrogram__define.pro
%                      HSI_SPECTROGRAM::DECIM_CORRECT  2271 /home/bulat/ssw/hessi/idl/spectra/hsi_spectrogram__define.pro
%                      HSI_BINNED_EVENTLIST::PROCESS_HOOK_POST   619 /home/bulat/ssw/hessi/idl/util/hsi_binned_eventlist__define.pro
%                      HSI_SPECTROGRAM::PROCESS  1125 /home/bulat/ssw/hessi/idl/spectra/hsi_spectrogram__define.pro
%                      FRAMEWORK::GETDATA   839 /home/bulat/ssw/gen/idl/objects/framework/framework__define.pro
%                      HSI_BINNED_EVENTLIST::GETDATA   462 /home/bulat/ssw/hessi/idl/util/hsi_binned_eventlist__define.pro
%                      FRAMEWORK::GETDATA   815 /home/bulat/ssw/gen/idl/objects/framework/framework__define.pro
%                      STRATEGY_HOLDER_TOOLS::GETDATA   315 /home/bulat/ssw/gen/idl/objects/framework/strategy_holder_tools__define.pro
%                      $MAIN$     

I remember this error also occurred when I just installed GDL and ran Richard's test.
Another unexpected thing is that obe = im->getdata(class='hsi_binned_eventlist') executes ~10 minutes. It starts to download something >1GB, I can't even find what exactly (I see downloading in the system monitor).

I think the size of obe (9 arrays) corresponds to the 9 detectors of the RHESSI instrument, so (*obe[3]).count is the counts in the 4th detector. Obviously, if counts are zero, there will be no plot, especially in logscale... These counts should have been corrected because there are float numbers. One of corrections is the decimation correction in which I get an error with GDL. Just a hypothesis: I get an error, you get bad numbers, couldn't it be a system-dependent problem? I use Ubuntu 22.04.

I couldn't find where exactly the data appear, but I found a trace. In the line 462 of ssw/hessi/idl/util/hsi_binned_eventlist__define.pro the data are assigned these very numbers:
data=self->Framework::GetData( _Extra = _extra )
So they are already in the hsi_binned_eventlist object. They seem to be set in PRO Framework::SetData, data, $ (/ssw/gen/idl/objects/framework__define.pro, line 876). I decided just to cause an error to see the backtrace, so I added
if size(data, /n_elements) EQ 9 then print, blahblah
to the empty line 880. The backtrace is as follows:

% Compiled module: HSI_DECIM_CORRECTION.
% Compiled module: PTR_CHK.
% Compiled module: HSI_FRONT_THRESHOLD.
% PRINT: Variable is undefined: BLAHBLAH.
% Execution halted at:  FRAMEWORK::SETDATA  880 /home/bulat/ssw/gen/idl/objects/framework/framework__define.pro
%                       HSI_BINNED_EVENTLIST::PROCESS_HOOK_POST  651 /home/bulat/ssw/hessi/idl/util/hsi_binned_eventlist__define.pro
%                       HSI_SPECTROGRAM::PROCESS 1125 /home/bulat/ssw/hessi/idl/spectra/hsi_spectrogram__define.pro
%                       FRAMEWORK::GETDATA  839 /home/bulat/ssw/gen/idl/objects/framework/framework__define.pro
%                       HSI_BINNED_EVENTLIST::GETDATA  462 /home/bulat/ssw/hessi/idl/util/hsi_binned_eventlist__define.pro
%                       FRAMEWORK::GETDATA  815 /home/bulat/ssw/gen/idl/objects/framework/framework__define.pro
%                       STRATEGY_HOLDER_TOOLS::GETDATA  315 /home/bulat/ssw/gen/idl/objects/framework/strategy_holder_tools__define.pro
%                       $MAIN$          
% Compiled module: FRAMEWORK_IS_OBJ_NESTED.

Maybe this helps...

@fawltylanguage
Copy link

2.65722 first appears in OUT at:

% HSI_SPECTROGRAM::REBIN               2090  /usr/local/ssw/hessi/idl/spectra/hsi_spectrogram__define.pro
% HSI_SPECTROGRAM::PROCESS              992  /usr/local/ssw/hessi/idl/spectra/hsi_spectrogram__define.pro
% FRAMEWORK::GETDATA                    839  /usr/local/ssw/gen/idl/objects/framework/framework__define.pro
% HSI_BINNED_EVENTLIST::GETDATA         462  /usr/local/ssw/hessi/idl/atest/hsi_binned_eventlist__define.pro
% FRAMEWORK::GETDATA                    815  /usr/local/ssw/gen/idl/objects/framework/framework__define.pro
% STRATEGY_HOLDER_TOOLS::GETDATA        315  /usr/local/ssw/gen/idl/objects/framework/strategy_holder_tools__define.pro
% $MAIN$  

@GillesDuvert
Copy link
Contributor

Wows, thanks everybody. I used stop and .step but it is not simple at all (especially if, as I suspect, there is something fishy with the (recent) dot-commands .STEP , .RET when objects are involved.) I remember this issue was initially for implementing BREAKPOINT, and indeed this is THE case it would help...
Will have a look. As in 5c2aad2 this can be a side-effect difficult to trace...

@GillesDuvert
Copy link
Contributor

for the record, SSW software, including RHESSI, is apparently working with GDL. Please use the discussion #1659

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants