view-fits: view astro/cosmo FITS file in Go

agolangf · · 567 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>astrogo just gained the ability to display images from telescopes or any other astro/cosmo apparatus that produces FITS files.</p> <p>it&#39;s there: <a href="https://github.com/astrogo/fitsio/blob/master/cmd/view-fits/main.go">https://github.com/astrogo/fitsio/blob/master/cmd/view-fits/main.go</a></p> <p><em>e.g.</em>:</p> <pre><code>$ curl -O -L http://data.astropy.org/tutorials/FITS-images/HorseHead.fits $ go get github.com/astrogo/fitsio/cmd/view-fits $ view-fits ./HorseHead.fits </code></pre> <p>enjoy!</p> <p>(many thanks to <a href="https://github.com/tbellembois">https://github.com/tbellembois</a> for providing the initial version and much of the grunt work!)</p> <hr/>**评论:**<br/><br/>dasacc22: <pre><p>I did a quick read at what FITS is, and as a hobbyist astronomer I was wondering what was available to shoot images like that and the practicality of it. I found a bit on &#34;Amateur Astronomical Spectrographs&#34; which perked my interest, but curious if you have any quick insights, again, for a hobbyist :)</p></pre>sbinet: <pre><p>FITS (<a href="https://en.wikipedia.org/wiki/FITS" rel="nofollow">https://en.wikipedia.org/wiki/FITS</a>) is a standard data file format for storing data in astrophysics, astronomy and cosmology.</p> <p>I actually don&#39;t know whether there are telescopes targeted at hobbyist astronomers which can readily produce images in that format.</p> <p>As FITS is the de facto standard in astro/cosmo, there are many s/w stacks and tools that deal with it: this allows for readily available tools to massage and post-process these images. (I suppose the main s/w stacks are IRAF and astropy.)</p> <p>I am sorry I can&#39;t be of more help than that, not being myself a hobbyist astronomer :)</p></pre>sbinet: <pre><p>and now, you can directly do:</p> <pre><code>$ go get github.com/astrogo/fitsio/cmd/view-fits $ view-fits http://data.astropy.org/tutorials/FITS-images/HorseHead.fits </code></pre> <p>enjoy :)</p></pre>lejatorn: <pre><blockquote> <p>go get github.com/astrogo/fitsio/cmd/view-fits</p> </blockquote> <p>you should vendor shiny (because I&#39;m lazy) ;P</p> <p>mpl@yggdrasil:~$ go get github.com/astrogo/fitsio/cmd/view-fits</p> <h1>golang.org/x/exp/shiny/driver/x11driver</h1> <p>src/golang.org/x/exp/shiny/driver/x11driver/screen.go:356: cannot use int32(width) (type int32) as type uint16 in argument to xproto.CreateWindow src/golang.org/x/exp/shiny/driver/x11driver/screen.go:356: cannot use int32(height) (type int32) as type uint16 in argument to xproto.CreateWindow</p></pre>dasacc22: <pre><p>yeah, you have an out dated version of shiny (like 6 months-ish). I think i may have even been the one to submit the CL to fix that. Vendoring for an app is good too though.</p></pre>sbinet: <pre><p>yeah... I suppose vendoring an x/exp(erimental) package is the right option, but I am lazy too :) (and as shiny is more or less the only external dependency of view-fits that I don&#39;t control, I prefer to have my code to always compile with a quick &#34;go get -u&#34; incantation)</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

567 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传