GNU Astronomy Utilities - Tasks: task #14154, Avoid reading a single HDU more...
You are not allowed to post comments on this tracker with your current authentication level.
task #14154: Avoid reading a single HDU more than once
Submitter: | Mohammad Akhlaghi <makhlaghi> | ||
Submitted: | Fri 09 Sep 2016 02:51:47 PM UTC | ||
Should Start On: | Thu 08 Sep 2016 03:00:00 PM UTC | Should be Finished on: | Thu 08 Sep 2016 03:00:00 PM UTC |
Category: | Arithmetic | Priority: | 5 - Normal |
Item Group: | Enhancement | Status: | Postponed |
Privacy: | Public | Percent Complete: | 0% |
Assigned to: | None | Open/Closed: | Open |
Effort: | 0.00 |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-09-09 | makhlaghi | Summary | Avoid reading a single file and header more than once | ![]() |
Avoid reading a single HDU more than once |
In Arithmetic, it is sometimes necessary to use the pixels of a sepecial HDU (one extension of a FITS file) more than once in one run. Especially now that conditional operators and the where operator are also included.
The way Arithmetic currently works is that it will read each HDU every time it confronts one on the command-line, it will then free it and the next time the same HDU comes up, it is read in again from the FITS file. For small files the CPU cache might be useful, but for common FITS images, it will fill up soon.
It is not hard to add a step which will check all the input HDUs (FITS files and extensions) and if there is more than one occurance of a specific HDU, it will read it and keep it in a special place in memory. This way, any time we need it we can just copy and use it. Also, since we know the total number of times it is being used, for the last time, we can just pass its pointer so it is free automatically by the operator. This process will avoid reading it a second, third, or any more number of times and thus greatly speed up its processing.
I currently don't have the time to implement this, but if you are up to it, state your interest here and take up this task ;-).