What is a .fits file? I don't think it matters, though. What function are you using to write the file? You say "when the data array is stored in binary format", but then say that you want to append the data to an ascii header, so it's not clear if you're trying to use the Write Text File or Write Binary File function. If you're using the Write Text File, the likely problem is that the function is, by default, set up to convert the EOL character to be platform dependent. To turn this off, right-click on the function and select the menu item "Convert EOL". The icon will change:

If you're using the Write Binary File then no conversion of your character would happen.
Message Edited by smercurio_fc on 07-30-2007 10:54 AM