Project

General

Profile

Recommendation #1557

Provide Easily found Public Documentation on how to read ISSI cubes into IDL

Added by Timothy Titus over 4 years ago. Updated over 3 years ago.

Status:
Acknowledged
Priority:
Normal
Assignee:
-
Category:
-
Impact:
Software Version:

Description

Provide a public tutorial that describes how one can read ISIS3 cubes into IDL without using DLM.

Step One: Convert ISIS3 Tile format to BSQ

Step Two: Use this IDL Code to read it.

function read_isis3bsq,file,nan=nan
;
;Purpose: To ingest ISIS3 Files with the Band Sequential Format
;
;Inputs:
; file: ISIS File to read
;

;Keywords:
; nan: if set - resets all special values to NAN.
;
lines=read_table(file,' ',1,30,/noerr)
pos=strpos(lines,'Samples')
w=where(pos ge 0)
nsamps=fix(string_all_after(lines[w[0]],'='))
pos=strpos(lines,'Lines')
w=where(pos ge 0)
nlines=fix(string_all_after(lines[w[0]],'='))
pos=strpos(lines,'Bands')
w=where(pos ge 0)
nbands=fix(string_all_after(lines[w[0]],'='))
print,nsamps,nlines,nbands
pos=strpos(lines,'StartByte')
w=where(pos ge 0)
skip=long(string_all_after(lines[w[0]],'='))
print,skip
;stop
core=fltarr(nsamps,nlines,nbands)
openr,unit,/get,file
rec=assoc(unit,core,skip-1)
;img=swap_endian(rec[0])
img=rec[0]
free_lun,unit
if keyword_set(nan) then begin
w=where(img lt (-1e-38))
if w[0] ne -1 then img[w]=!values.f_nan
endif
return,img
end

History

#1 Updated by Anonymous over 4 years ago

  • Project changed from ALT to ISIS
  • Category deleted (Tactical)

#2 Updated by Anonymous over 4 years ago

  • Status changed from Closed to In Progress

#3 Updated by Anonymous over 4 years ago

  • Status changed from In Progress to Acknowledged

Also available in: Atom PDF