<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I've not understood why</p>
<p> <i>for the special case where BZERO is an integer</i></p>
<p>would be a special case. The standard says that BZERO and BSCALE
are real, so if the fits file says BZERO 10 or 10.0 that's the
same. Same for BSCALE.<br>
</p>
<p>The processing software still has one option to cast the final
data, and that has nothing to do with the standard in my opinion,
and that's if they want the data to wind up being int8 vs.
float64, say. I got more the impression this is what you were
thinking of.</p>
<p>peter</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 3/12/24 10:57, Barrett, Paul via
fitsbits wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAA4a5YP4cHeN0P0d5yEAjpbOen0G0SZEdi4_39EcpK5uFPFTUA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>I'll ask this question one more time and then I'll let it
go.</div>
<div><br>
</div>
<div>I understand that the default behaviour for BZERO and
BSCALE creates a floating point array because of the typical
upconversion rules. However, I'm not clear about the data type
for the special case where BZERO is an integer. In this case,
it appears that BZERO is added first to the integer array
before converting it to a floating point array, because BSCALE
= 1.0 implies upconversion. Is this correct?</div>
<div><br>
</div>
<div><br>
</div>
<div>As for your comments:</div>
<div><br>
</div>
<div>* I disagree with your first comment. FITS is used because
of peer pressure. It is mandated by NASA. That means a large
sector of the community HAS to use it.<br>
</div>
<div>* Yes, dynamic languages are dynamic enough. In the case of
Julia, it can do everything that C/C++, FORTRAN, and Python
can do. <i>Think of Julia as Python with Numba built-in.</i></div>
<div><br>
</div>
<div> -- Paul</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Mar 12, 2024 at
9:39 AM Seaman, Robert Lewis - (rseaman) via fitsbits <<a
href="mailto:fitsbits@listmgr.nrao.edu"
moz-do-not-send="true" class="moz-txt-link-freetext">fitsbits@listmgr.nrao.edu</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="msg-4764696287282454613">
<div style="overflow-wrap: break-word;" lang="EN-US">
<div class="m_5981172119576558766WordSection1">
<div
id="m_5981172119576558766mail-editor-reference-message-container">
<div>
<div>
<p class="MsoNormal">Howdy,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">It is always good to see a
spirited FITS discussion! A few more peppy
points:</p>
<p class="MsoNormal"> </p>
<ul style="margin-top:0in" type="disc">
<li
class="m_5981172119576558766MsoListParagraph"
style="margin-left:0in">There is always an
assertion that it would be preferable to use a
“modern” format</li>
</ul>
<ul style="margin-top:0in" type="disc">
<ul style="margin-top:0in" type="circle">
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">Yet
projects often end up using FITS</li>
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">This
choice does not result from peer pressure</li>
</ul>
</ul>
<p class="MsoNormal"> </p>
<ul style="margin-top:0in" type="disc">
<li
class="m_5981172119576558766MsoListParagraph"
style="margin-left:0in">There is nothing magic
about IEEE floating point or twos-complement
integers</li>
</ul>
<ul style="margin-top:0in" type="disc">
<ul style="margin-top:0in" type="circle">
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">Efficient
(compressed) data representations may not
even be binary (Rice is unary)</li>
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">Are
dynamically typed languages dynamic enough?</li>
</ul>
</ul>
<p class="MsoNormal"> </p>
<ul style="margin-top:0in" type="disc">
<li
class="m_5981172119576558766MsoListParagraph"
style="margin-left:0in">A tile-compressed
image is a simple binary table</li>
</ul>
<ul style="margin-top:0in" type="disc">
<ul style="margin-top:0in" type="circle">
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">My
first encounter with FITS data (c. 1983) was
writing a FITS image reader from scratch by
consulting the original journal article(s)
(possibly also my first encounter with C)</li>
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">I
am confident young Rob could have written a
reader for tile-compressed binary data with
little more effort (or code) just from
reading the current FITS standard</li>
</ul>
</ul>
<p class="MsoNormal"> </p>
<ul style="margin-top:0in" type="disc">
<li
class="m_5981172119576558766MsoListParagraph"
style="margin-left:0in">FITS documentation is
pretty good</li>
</ul>
<ul style="margin-top:0in" type="disc">
<ul style="margin-top:0in" type="circle">
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">(Comments
about other projects’ documentation omitted)</li>
</ul>
</ul>
<p class="MsoNormal"> </p>
<ul style="margin-top:0in" type="disc">
<li
class="m_5981172119576558766MsoListParagraph"
style="margin-left:0in">Most FITS
discussions/disagreements are about metadata</li>
</ul>
<ul style="margin-top:0in" type="disc">
<ul style="margin-top:0in" type="circle">
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">Only
a small minority of FITS metadata is
strictly required to enforce the structure
of each extension</li>
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">Science
metadata (astronomical and computer science)
would be legal (and trivial) to represent,
using any schema you like, in a binary table
structure, described in a convention or
appendix or chapter of the standard</li>
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">Schemata
could also include language-specific pragma,
for data-typing purposes or otherwise</li>
</ul>
</ul>
<p class="MsoNormal"> </p>
<ul style="margin-top:0in" type="disc">
<li
class="m_5981172119576558766MsoListParagraph"
style="margin-left:0in">It is perhaps peer
pressure that pushes projects to use 80-char
ASCII header keywords in 2880-byte records</li>
</ul>
<ul style="margin-top:0in" type="disc">
<ul style="margin-top:0in" type="circle">
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">Consider,
rather, what is the optimal tiled
representation for your project, and
separately</li>
<li
class="m_5981172119576558766MsoListParagraph" style="margin-left:0in">How
can your project’s (and community) metadata
best be represented in a schema realized as
a binary table?</li>
</ul>
</ul>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Rob</p>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
fitsbits mailing list<br>
<a href="mailto:fitsbits@listmgr.nrao.edu" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">fitsbits@listmgr.nrao.edu</a><br>
<a href="https://listmgr.nrao.edu/mailman/listinfo/fitsbits"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://listmgr.nrao.edu/mailman/listinfo/fitsbits</a><br>
</div>
</blockquote>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
fitsbits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fitsbits@listmgr.nrao.edu">fitsbits@listmgr.nrao.edu</a>
<a class="moz-txt-link-freetext" href="https://listmgr.nrao.edu/mailman/listinfo/fitsbits">https://listmgr.nrao.edu/mailman/listinfo/fitsbits</a>
</pre>
</blockquote>
</body>
</html>