taskGNU Astronomy Utilities - Tasks: task #14115, MakeProfiles flat profiles have a...


You are not allowed to post comments on this tracker with your current authentication level.

task #14115: MakeProfiles flat profiles have a given value

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Thu 11 Aug 2016 08:40:17 PM UTC
Should Start On:  Thu 11 Aug 2016 03:00:00 PM UTC Should be Finished on:  Thu 11 Aug 2016 03:00:00 PM UTC
Category:  MakeProfiles Priority:  5 - Normal
Item Group:  Enhancement Status:  Done
Privacy:  Public Assigned to:  makhlaghi
Percent Complete:  100% Open/Closed:  Closed
Effort:  0.00

Sat 13 Aug 2016 12:53:28 AM UTC, comment #1: 

The two old options have been removed and a more generic, robust and easier to read system was implemented. Please see the commit message for more details.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Thu 11 Aug 2016 08:40:17 PM UTC, original submission:  

One of MakeProfile's functions is the flat (code 4) profile. By default, it will distribute the full magnitude of the profile uniformly over every pixel. Using options like `--setconsttonan', `--setconsttomin', its possible to use this kind of profile for other purposes, for example to mask a given region.

One very useful application of the flat profile function is that all the pixels associated with a given circular/elliptical region have a fixed value (different from other profiles). The main purpose of doing something like this would be to use the output as an object region in MakeCatalogs to do aperture photometry after running NoiseChisel on the image (instead of using NoiseChisel's object regions). However, NoiseChisel's Sky and Sky standard deviation values can be very useful in aperture photometry.

With the current facilities in Makeprofiles doing this is not impossible: suppose you want one set of pixels within a given ellipse to have the value of 128. Let's say the area of the elliptical region you have in mind is N pixels. Given a zeropoint, you can then find the magnitude for a total flux of N*128. This can be done in a script, but it is not easy to carry, or write that script every time you need it. Since aperture photometry is a common process in astronomy, it justifies one extra options in MakeProfiles.

So the suggested process would go like this: if the user specifies an ID column, then it is assumed that the value of the ID column is the fixed value assumed for the profile (has to be an integer). It is then possible to do take the steps explained above at the start of MakeProfiles and let the existing tools do the job, but I am affraid that all the mathematical operations that are necessary and the floating point errors might give final values of 148.99999999 instead of 149. So when run in this mode, we will have to put a rounding function. This will all be expensive. So at this stage, I think its easier to just put a condition in the profile builder and use this fixed value instead of the calculated magnitude value (similar to the options mentioned at first).

It might also be possible to set the output's type to 'long' (instead of float) to make it even faster. But if it will cause complication in the code (making the code too hard to read), there is no problem with a float format, MakeCatalog will convert all pixel map data into long internally before using them as long.

Mohammad Akhlaghi <makhlaghi>
Group administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)

    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.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-13 makhlaghi StatusIn Progress Done
        Percent Complete0% 100%
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code