Menu

#724 CLOSE,lu is not healthy for COMPRESSED files

v1.0 (example)
closed
nobody
None
5
2018-04-06
2017-10-02
GregJung
No

I want to rewind a compressed file - to do that normally

close, lun
openr,lun,filename,/compressed

However this is not sufficient. Below, sampledat and sampleat.gz have the same content: First the sampledat is opened and displayed, close, then displayed again. Then similar actions on the compressed file.

$ gdlcvs

GDL - GNU Data Language, Version 0.9.7 CVS

% Compiled module: PATH_SEP.
GDL> fn='sampledat'
GDL> openr,101,fn & ll=bytarr(80)
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
SIMPLE = T / HDU 0==========================================
BITPIX = 8 / Number of bits per data pixel
NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include extensions
COMMENT +------------------+
COMMENT | XTE - FITS File |
COMMENT | Generated by XFF |
COMMENT +------------------+
COMMENT >>>>> >>>>> <<<<< <<<<<
COMMENT > This file is written following certain XTE-GOF <
GDL> close,101
GDL> openr,101,fn
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
SIMPLE = T / HDU 0==========================================
BITPIX = 8 / Number of bits per data pixel
NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include extensions
COMMENT +------------------+
COMMENT | XTE - FITS File |
COMMENT | Generated by XFF |
COMMENT +------------------+
COMMENT >>>>> >>>>> <<<<< <<<<<
COMMENT > This file is written following certain XTE-GOF <
GDL> close,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
SIMPLE = T / HDU 0==========================================
BITPIX = 8 / Number of bits per data pixel
NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include extensions
COMMENT +------------------+
COMMENT | XTE - FITS File |
COMMENT | Generated by XFF |
COMMENT +------------------+
COMMENT >>>>> >>>>> <<<<< <<<<<
COMMENT > This file is written following certain XTE-GOF <
GDL> close,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
COMMENT > conventions which are documented in XFF/95-004 <
COMMENT >>SIMPLE = T / HDU 0===================
=======================BITPIX = 8 / Number of bits per data
pixel NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include
extensions COMMENT +------
------------+ COMMENT | XTE -
FITS File | COMMENT | Gener
ated by XFF | COMMENT +------
------------+ COMMENT >>>>> >>>>> <<<<<
GDL> close,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
<<<<< COMMENT > This file is written following
certain XTE-GOF < COMMENT > conventions which are documente
d in XFF/95-004 < COMMENT >>SIMPLE = T / H
DU 0==========================================BITPIX = 8 / N
umber of bits per data pixel NAXIS = 0 / N
umber of data axes EXTEND = T / F
ITS dataset may include extensions COMMENT
+------------------+ COMMENT
| XTE - FITS File | COMMENT
| Generated by XFF | COMMENT
GDL> free_lun,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
SIMPLE = T / HDU 0==========================================
BITPIX = 8 / Number of bits per data pixel
NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include extensions
COMMENT +------------------+
COMMENT | XTE - FITS File |
COMMENT | Generated by XFF |
COMMENT +------------------+
COMMENT >>>>> >>>>> <<<<< <<<<<
COMMENT > This file is written following certain XTE-GOF <
GDL> close,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
COMMENT > conventions which are documented in XFF/95-004 <
COMMENT >>SIMPLE = T / HDU 0===================
=======================BITPIX = 8 / Number of bits per data
pixel NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include
extensions COMMENT +------
------------+ COMMENT | XTE -
FITS File | COMMENT | Gener
ated by XFF | COMMENT +------
------------+ COMMENT >>>>> >>>>> <<<<<
GDL> exit

Related

Bugs: #724

Discussion

  • giloo

    giloo - 2017-10-13
     
  • giloo

    giloo - 2017-10-13

    solved in cvs now.

     
  • Sylwester Arabas

    Should we close it?

     
    • GregJung

      GregJung - 2018-04-06

      Yes I believe the compressed file issues were resolved.
      BTW I haven't received notice, and so I assume I am not included yet,
      on the github list. Thanks.
      Greg

      On Thu, Apr 5, 2018 at 2:42 PM, Sylwester Arabas slayoo@users.sourceforge.net wrote:

      Should we close it?

      Status: open
      Group: v1.0 (example)
      Created: Mon Oct 02, 2017 10:09 PM UTC by GregJung
      Last Updated: Fri Oct 13, 2017 10:20 PM UTC
      Owner: nobody

      I want to rewind a compressed file - to do that normally

      close, lun
      openr,lun,filename,/compressed

      However this is not sufficient. Below, sampledat and sampleat.gz have the
      same content: First the sampledat is opened and displayed, close, then
      displayed again. Then similar actions on the compressed file.

      $ gdlcvs

      GDL - GNU Data Language, Version 0.9.7 CVS

      % Compiled module: PATH_SEP.
      GDL> fn='sampledat'
      GDL> openr,101,fn & ll=bytarr(80)
      GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
      SIMPLE = T / HDU 0==========================================
      BITPIX = 8 / Number of bits per data pixel
      NAXIS = 0 / Number of data axes
      EXTEND = T / FITS dataset may include extensions
      COMMENT +------------------+
      COMMENT | XTE - FITS File |
      COMMENT | Generated by XFF |
      COMMENT +------------------+
      COMMENT >>>>> >>>>> <<<<< <<<<<
      COMMENT > This file is written following certain XTE-GOF <
      GDL> close,101
      GDL> openr,101,fn
      GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
      SIMPLE = T / HDU 0==========================================
      BITPIX = 8 / Number of bits per data pixel
      NAXIS = 0 / Number of data axes
      EXTEND = T / FITS dataset may include extensions
      COMMENT +------------------+
      COMMENT | XTE - FITS File |
      COMMENT | Generated by XFF |
      COMMENT +------------------+
      COMMENT >>>>> >>>>> <<<<< <<<<<
      COMMENT > This file is written following certain XTE-GOF <
      GDL> close,101
      GDL> openr,101,fn+".gz",/comp
      GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
      SIMPLE = T / HDU 0==========================================
      BITPIX = 8 / Number of bits per data pixel
      NAXIS = 0 / Number of data axes
      EXTEND = T / FITS dataset may include extensions
      COMMENT +------------------+
      COMMENT | XTE - FITS File |
      COMMENT | Generated by XFF |
      COMMENT +------------------+
      COMMENT >>>>> >>>>> <<<<< <<<<<
      COMMENT > This file is written following certain XTE-GOF <
      GDL> close,101
      GDL> openr,101,fn+".gz",/comp
      GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
      COMMENT > conventions which are documented in XFF/95-004 <
      COMMENT >>SIMPLE = T / HDU 0===================
      =======================BITPIX = 8 / Number of bits per data
      pixel NAXIS = 0 / Number of data axes
      EXTEND = T / FITS dataset may include
      extensions COMMENT +------
      ------------+ COMMENT | XTE -
      FITS File | COMMENT | Gener
      ated by XFF | COMMENT +------
      ------------+ COMMENT >>>>> >>>>> <<<<<
      GDL> close,101
      GDL> openr,101,fn+".gz",/comp
      GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
      <<<<< COMMENT > This file is written following
      certain XTE-GOF < COMMENT > conventions which are documente
      d in XFF/95-004 < COMMENT >>SIMPLE = T / H
      DU 0==========================================BITPIX = 8 / N
      umber of bits per data pixel NAXIS = 0 / N
      umber of data axes EXTEND = T / F
      ITS dataset may include extensions COMMENT
      +------------------+ COMMENT
      | XTE - FITS File | COMMENT
      | Generated by XFF | COMMENT
      GDL> free_lun,101
      GDL> openr,101,fn+".gz",/comp
      GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
      SIMPLE = T / HDU 0==========================================
      BITPIX = 8 / Number of bits per data pixel
      NAXIS = 0 / Number of data axes
      EXTEND = T / FITS dataset may include extensions
      COMMENT +------------------+
      COMMENT | XTE - FITS File |
      COMMENT | Generated by XFF |
      COMMENT +------------------+
      COMMENT >>>>> >>>>> <<<<< <<<<<
      COMMENT > This file is written following certain XTE-GOF <
      GDL> close,101
      GDL> openr,101,fn+".gz",/comp
      GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
      COMMENT > conventions which are documented in XFF/95-004 <
      COMMENT >>SIMPLE = T / HDU 0===================
      =======================BITPIX = 8 / Number of bits per data
      pixel NAXIS = 0 / Number of data axes
      EXTEND = T / FITS dataset may include
      extensions COMMENT +------
      ------------+ COMMENT | XTE -
      FITS File | COMMENT | Gener
      ated by XFF | COMMENT +------
      ------------+ COMMENT >>>>> >>>>> <<<<<
      GDL> exit


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnudatalanguage/bugs/724/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #724

  • Sylwester Arabas

    • status: open --> closed
     
  • Sylwester Arabas

    Closing.

     

Log in to post a comment.

MongoDB Logo MongoDB