From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.109.57.221.228.mobile.3.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: A little trouble with very large arrays. Date: Sat, 06 Oct 2018 08:40:22 +0200 Organization: JSA Research & Innovation Message-ID: <871s93tw6h.fsf@jacob-sparre.dk> References: <3f2828df-d54a-4427-bc3c-dc5ef0dc8069@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: franka.jacob-sparre.dk; posting-host="109.57.221.228.mobile.3.dk:109.57.221.228"; logging-data="17587"; mail-complaints-to="news@jacob-sparre.dk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:UtTx5ATJfBWegwBibX1u4qEJnX8= Xref: reader02.eternal-september.org comp.lang.ada:54500 Date: 2018-10-06T08:40:22+02:00 List-Id: Niklas Holsti wrote: > If your FITS files are not much larger than your RAM, the fastest > approach is probably to "mmap" the file into your virtual address > space and then compute the address of any given image pixel with the > flattening method. If your FITS files are larger than your RAM, your > program should process the file as a stream, which may or may not be > practical, depending on what the program should output. Why not leave the transport between disk and RAM to the operating system, and use memory mapping even if the file is larger than the RAM of the system? Greetings, Jacob -- "When we cite authors we cite their demonstrations, not their names" -- Pascal