GNU Astronomy Utilities - Tasks: task #14639, Select rows that are within a...
You are not allowed to post comments on this tracker with your current authentication level.
task #14639: Select rows that are within a given polygon
Submitter: | Mohammad Akhlaghi <makhlaghi> | ||
Submitted: | Sun 24 Sep 2017 11:26:37 PM UTC | ||
Should Start On: | Sun 24 Sep 2017 10:00:00 PM UTC | Should be Finished on: | Sun 24 Sep 2017 10:00:00 PM UTC |
Category: | Table | Priority: | 5 - Normal |
Item Group: | Enhancement | Status: | Done |
Privacy: | Public | Assigned to: | sks_15 |
Percent Complete: | 100% | Open/Closed: | Closed |
Effort: | 0.00 |
Jump to the original submission
Sun 10 May 2020 05:42:19 PM UTC, comment #19: |
Mohammad Akhlaghi <makhlaghi> |
Sun 10 May 2020 03:27:47 PM UTC, comment #18: All requirements are done and pushed here. Docs are also added:) |
Sachin Kumar Singh <sks_15> |
Sun 10 May 2020 01:43:25 AM UTC, comment #17: Just a small point on the current implementation: you don't know the type of the two columns, they may be anything: uint8_t, int16_t, or float64. They may also have different types: one of them uint8_t, another float64!
|
Mohammad Akhlaghi <makhlaghi> |
Sat 09 May 2020 01:00:50 AM UTC, comment #16: I don't understand why you think the ID column is required? If a user wants the ID, they will ask for it with the `--column' option. it is unrelated to the coordinates and if they are in the polygon or not!
|
Mohammad Akhlaghi <makhlaghi> |
Fri 08 May 2020 10:13:40 PM UTC, comment #15: Pushed new changes here. As the ID column was required to be stored in the output, I made use of a third column. Then used a temporary array as the number of rows would be unknown until they are passed through `gal_polygon_is_inside`. Printing the values of column showed the right output.
|
Sachin Kumar Singh <sks_15> |
Fri 08 May 2020 02:27:30 AM UTC, comment #14: Thanks for starting work on this Sachin, I guess this problem was too hard for this stage, so I done all the major work in this commit on my development-fork of Gnuastro. It is over your branch, so if you add this fork to your remotes and pull it, you'll get the commit and can build upon it.
|
Mohammad Akhlaghi <makhlaghi> |
Thu 07 May 2020 09:46:52 PM UTC, comment #13: I pushed the code here.
|
Sachin Kumar Singh <sks_15> |
Tue 21 Apr 2020 08:57:53 PM UTC, comment #12: I can give you the exact procedure, but that will take more time than actually doing it myself ;-)! Besides, its a good excuse to get more familiar with the internal Gnuastro program implementation.
|
Mohammad Akhlaghi <makhlaghi> |
Tue 21 Apr 2020 07:43:22 PM UTC, comment #11: How can I read the RA and DEC columns values in my function? Also what column should I use for traversal in `table_selection`? |
Sachin Kumar Singh <sks_15> |
Tue 21 Apr 2020 12:50:38 AM UTC, comment #10: There are ways to do it in a single option, but that require a lot of customization.
|
Mohammad Akhlaghi <makhlaghi> |
Mon 20 Apr 2020 09:41:05 PM UTC, comment #9: Sorry, some important college work came up and had to complete it. But I've started working on this task now. After some brainstorming and a rough implementation, following problems arose:
|
Sachin Kumar Singh <sks_15> |
Thu 16 Apr 2020 01:44:49 AM UTC, comment #8: Let me give you a real-world example:
|
Mohammad Akhlaghi <makhlaghi> |
Tue 14 Apr 2020 04:57:23 PM UTC, comment #7: So essentially I'm given a column with X and Y coordinates(I think they are represented in spherical coordinates in the fits files as there are MAGNITUDE, RA, DEC columns in HDU's when I did an `asttable table.fits -i`, right?). But for now I assume them to be in rectangular coordinates (X,Y). So we are roughly given data in the following format:
As assuming the coordinates are represented in spherical form, then X and Y are in same rows.
|
Sachin Kumar Singh <sks_15> |
Thu 09 Apr 2020 06:36:50 PM UTC, comment #6: Sorry, a few typo corrections in my previous comment:
|
Mohammad Akhlaghi <makhlaghi> |
Thu 09 Apr 2020 06:32:18 PM UTC, comment #5: In my previous comment, I had mentioned this as a column arithmetic operator. But now that I think more about, it is more like the `--range' operator (where we remove some rows based on a certain criteria).
|
Mohammad Akhlaghi <makhlaghi> |
Thu 09 Apr 2020 05:57:28 PM UTC, comment #4: Which files should I look into for this task? |
Sachin Kumar Singh <sks_15> |
Sun 29 Mar 2020 06:51:27 PM UTC, comment #3: Good point! We now have all the low-level tools for this task!
|
Mohammad Akhlaghi <makhlaghi> |
Sun 29 Mar 2020 06:03:06 PM UTC, comment #2: What other features are left to be implemented on this task? |
Sachin Kumar Singh <sks_15> |
Thu 28 Sep 2017 11:12:22 PM UTC, comment #1: The region covered by most surveys can be represented with a convex polygon (see gal_polygon_ordered_corners).
|
Mohammad Akhlaghi <makhlaghi> |
Sun 24 Sep 2017 11:26:37 PM UTC, original submission:
Astronomical surveys are limited to a certain area of the sky (which can usually be represented nicely as the coordinates of a polygon).
|
Mohammad Akhlaghi <makhlaghi> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
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 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2020-05-10 | makhlaghi | Status | Postponed | Done | |
Percent Complete | 0% | 100% | |||
Open/Closed | Open | Closed | |||
Carbon-Copy | - | Added -email is unavailable- | |||
2020-05-09 | makhlaghi | Summary | Table arithmetic operator to find rows within given region | Select rows that are within a given polygon | |
2020-04-21 | makhlaghi | Carbon-Copy | Removed -email is unavailable- | - | |
2020-04-09 | makhlaghi | Assigned to | None | sks_15 | |
2020-03-29 | makhlaghi | Category | New program | Table | |
Summary | Program to identify points inside/outside a region | Table arithmetic operator to find rows within given region | |||
2017-09-24 | makhlaghi | Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-4448.
Corresponding source code
Thanks a lot Sachin, I done some further modifications, added an `--outpolygon' option also and pushed it as one commit to Gnuastro's master branch. I marked this task as closed/complete.
Before deleting your original commit, please inspect the `diff' with this final commit on the master branch with your original commit see the modifications I made. They contain some good points which can be educative for you as you get more involved in Gnuastro ;-).
Maybe one interesting thing, which is not unrelated to your GSoC project, is to think about the necessary changes to enable a similar option in a spherical space, not just Euclidean.