dwkim78 / ASTRiDE

AUTOMATED STREAK DETECTION FOR ASTRONOMICAL IMAGES
MIT License
49 stars 23 forks source link

Store data in Astropy Table #32

Open michaelbaisch opened 2 months ago

michaelbaisch commented 2 months ago

Hello,

Currently, all data is stored in the EDGE class as an array of dictionaries, and a CSV is manually created using the write_output() method. I suggest using an Astropy Table to store all data. Astropy Tables support many calculations and filtering options, as well as a variety of output formats.

I believe it makes sense to be more compatible with Astropy by using these tables. Additionally, some operations might become simpler and cleaner, and writing data to disk would be more convenient in many different formats. We might even try to align more closely with the structure and naming conventions of photutils.segmentation.SourceCatalog (to_table() returns a QTable; DEFAULT_COLUMNS defines the columns).

Additionally, we might only return that table as a result and let the user of ASTRiDE choose how and in which format to write the data, since it’s so simple. Using QTable would also enable us to use quantities with units.

Greetings, Michael

dwkim78 commented 1 month ago

Hi Michael,

As long as the astropy and phoutils don't slow down the ASTRiDE performance (i.e. wall-clock time), I'm agree with this. As I have experienced slow photutils performance before, we need to check the QTable performance as well.

Cheers,

Dae-Won