comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Saving file after editting
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Saving file after editting [message #94357] Tue, 18 April 2017 11:39 Go to next message
alghafisuct is currently offline  alghafisuct
Messages: 20
Registered: November 2014
Junior Member
Hi All

I have .dat file which is binary format unsigned integer 32. The file is 5000 by 5359 and I use the following to read the file in IDL as a complex numbers

array_HH = make_array(5000, 5359, /dcomplex, /nozero)

filename_HH = ('C:\Users\asus\Desktop\IDL_PROJECTS\20151021115853_11_SAR_C PLX_0_pres_8.dat')

OPENR, importUnit, filename_HH, /GET_LUN

READU, importUnit, array_HH

CLOSE, importUnit

FREE_LUN, importUnit

Absloute_Value_HH = ABS(array_HH)

Image_HH = Absloute_Value_HH^(0.7/2)

My question is I want to save the file after editing as .dat file with the same format and saving it in the same file not a new file. How can that be done so once I open it again, I open it the same way

Regards
Re: Saving file after editting [message #94359 is a reply to message #94357] Wed, 19 April 2017 06:05 Go to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
If you open the file with OpenW instead of OpenR, it will erase the old file and open it for writing. See the documentation for writing in binary format.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Get column_labels from widget_table?
Next Topic: constant time cadence

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:40:46 PDT 2025

Total time taken to generate the page: 0.00583 seconds