<p>I have downloaded galactic center sky images from the Swift database (<a href="https://www.swift.ac.uk/swift_live/index.php#doSimpleSearch.php?catname=swiftmastr&amp;searchpos=galactic+center&amp;searchrad=10&amp;searchepoch=2000&amp;getWhat=2&amp;sortBy=_r&amp;dandr=on&amp;coordType=0&amp;retEpoch=2000&amp;retType=0&amp;retWhere=1" rel="nofollow noreferrer">https://www.swift.ac.uk/swift_live/index.php#doSimpleSearch.php?catname=swiftmastr&amp;searchpos=galactic+center&amp;searchrad=10&amp;searchepoch=2000&amp;getWhat=2&amp;sortBy=_r&amp;dandr=on&amp;coordType=0&amp;retEpoch=2000&amp;retType=0&amp;retWhere=1</a>).
In particular, Galactic Center observation 00088962001 (radius 10, all columns, zip file).</p>
<p>I want to detect persistent sources in all filters, except white, with uvotdetect. I installed Heasoft, CALDB and DS9 on Ubuntu WSL2 Linux subsystem on Windows 11. Everything seems to work fine, but sometimes uvotdetect gives a weird .fits file output. It's supposed to show a header with astronomical data but with some files I only see weird signs. This happened to 3 out of 6 images I processed with uvotdetect. I might be new to this but can somebody explain?</p>
<p>Below are some pictures of what's happening.</p>
<p>What it should produce:
<a href="https://i.sstatic.net/6v56X.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6v56X.png" alt="enter image description here" /></a></p>
<p>Unreadable file:
<a href="https://i.sstatic.net/c4Tzs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/c4Tzs.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2022-04-14T21:07:59.413Z
Welcome to Astronomy SE! Usually we're encouraged to post the actual text instead of screenshots, but in this case I don't think it's necessary; the second is just a mashup of what looks like a program trying to display binary as if it were normal text. See for example answers to [Why does a diamond with a question mark in it � appear in my HTML?](https://stackoverflow.com/q/15276191/3904031) A couple of questions: 1) If you run each case multiple times, is it reproducible? Do some cases *always* work and the rest *never* work? 2) For those that don't does the input have any unusual characters
uhoh
CC BY-SA 4.0
2022-04-14T21:10:55.397Z
for example a name or command that accidentally got a control character in it? 3) What are the "previous errors" for the case where the output looks good and why are there no previous errors for the case where it's bad?  4) What happens if you process them in a different order?
uhoh
CC BY-SA 4.0
2022-04-15T16:21:36.037Z
I would suggest getting [fitsverify](https://heasarc.gsfc.nasa.gov/docs/software/ftools/fitsverify/) if it's not already installed as part of HEASOFT. This will let you verify FITS files and list their header as regular text without relying on something not getting tripped up by binary characters.
astrosnapper
CC BY-SA 4.0
2022-04-20T21:32:09.317Z
What is the exact command you ran and did you try opening it with e.g. the fits viewer "fv" or just "fdump"? Do you get the same issue when downloading not the zip-file but the tar-file? Btw.: On my side "uvotdetect sw00088962001ubb_sk.img.gz" seems to work just fine.
SpaceCore
<observational-astronomy><telescope><data-analysis><software><fits>
uvotdetect sometimes doesn't make valid .fits files for DS9 to read (Swift UVOT, Heasoft)
Seda 
# uvotdetect sometimes doesn't make valid .fits files for DS9 to read (Swift UVOT, Heasoft)

(Asked by: username_0 on 2022-04-14)

I have downloaded galactic center sky images from the Swift database (<https://www.swift.ac.uk/swift_live/index.php#doSimpleSearch.php?catname=swiftmastr&searchpos=galactic+center&searchrad=10&searchepoch=2000&getWhat=2&sortBy=_r&dandr=on&coordType=0&retEpoch=2000&retType=0&retWhere=1>).
In particular, Galactic Center observation 00088962001 (radius 10, all columns, zip file).

I want to detect persistent sources in all filters, except white, with uvotdetect. I installed Heasoft, CALDB and DS9 on Ubuntu WSL2 Linux subsystem on Windows 11. Everything seems to work fine, but sometimes uvotdetect gives a weird .fits file output. It's supposed to show a header with astronomical data but with some files I only see weird signs. This happened to 3 out of 6 images I processed with uvotdetect. I might be new to this but can somebody explain?

Below are some pictures of what's happening.

What it should produce:
[![enter image description here](https://i.sstatic.net/6v56X.png)](https://i.sstatic.net/6v56X.png)

Unreadable file:
[![enter image description here](https://i.sstatic.net/c4Tzs.png)](https://i.sstatic.net/c4Tzs.png)

**Tags:** observational-astronomy, telescope, data-analysis, software, fits

> **Comments:**
> **username_1**: Welcome to Astronomy SE! Usually we're encouraged to post the actual text instead of screenshots, but in this case I don't think it's necessary; the second is just a mashup of what looks like a program trying to display binary as if it were normal text. See for example answers to [Why does a diamond with a question mark in it � appear in my HTML?](https://stackoverflow.com/q/15276191/3904031) A couple of questions: 1) If you run each case multiple times, is it reproducible? Do some cases *always* work and the rest *never* work? 2) For those that don't does the input have any unusual characters  
> **username_1**: for example a name or command that accidentally got a control character in it? 3) What are the "previous errors" for the case where the output looks good and why are there no previous errors for the case where it's bad?  4) What happens if you process them in a different order?  
> **username_2**: I would suggest getting [fitsverify](https://heasarc.gsfc.nasa.gov/docs/software/ftools/fitsverify/) if it's not already installed as part of HEASOFT. This will let you verify FITS files and list their header as regular text without relying on something not getting tripped up by binary characters.  
> **username_3**: What is the exact command you ran and did you try opening it with e.g. the fits viewer "fv" or just "fdump"? Do you get the same issue when downloading not the zip-file but the tar-file? Btw.: On my side "uvotdetect sw00088962001ubb_sk.img.gz" seems to work just fine.  

---

## 0 answers

