Giter Club home page Giter Club logo

frigate's Introduction

What's Frigate?

Frigate is a tool to retrieve and analyze alert data from the ZTF alert stream, from the full set of alerts to the subset of alerts that passed filters in Fritz, and the subset that was saved as proper astronomical sources. The current frigate/__main__.py only addresses step 1 (getting the full set of alerts for a specified time period, usually one night). The script found in scripts/alert-stats.py is an earlier attempt at step 1,2, and 3 along with visualization. Next, we plan to integrate better versions of step 2 and 3 in the frigate/__main__.py script and add more visualization tools.

You can run frigate with:

PYTHONPATH=. python frigate

To get the list of all possible arguments, you can run:

PYTHONPATH=. python frigate --help

To run the deprecated scripts/alert-stats.py script, you can run:

PYTHONPATH=. python scripts/alert-stats.py --feature='candidate.magpsf,candidate.sigmapsf' --programids=1,2 --plot=True --start=2460355.5 --nb_days=1 --sp_token=<your_sp_token> --sp_groupIDs=41 --sp_filterIDs=1 --nb_bins=1000 --k_token=<your_kowalski_token>
  • Fetch all the features of all alert packets within a given time range with given program ids and store it as a pandas dataframe
  • Fetch all of the candidates that passed filters in Fritz (with exact candid, not just objectIds). Relies on the new /api/candidates_filter endpoint.
  • Looking at the subset of alerts that passed the filters, find the obj_id of the sources that were saved in Fritz.
  • Update the dataframe with a column containing the list of filters passed for each alert, and a column containing the groupIDs for each alert which obj has been saved as a source to the groups associated to the filters passed.
  • Figure out what visualizations tools and plots we can use to represent the data in a meaningful way and extract insights from it.

Troubleshooting

On a system with low memory, you can call frigate with the --low_memory=True flag to reduce memory usage. This will save each subset of alerts to disk, and concatenate them at the end instead of concatenating as the batched queries return. That way we avoid growing the memory of the main process while the individual threads are running. In the future, we want to expand on that mode to reduce the nb of alerts fetched per batch query to reduce the memory usage even more.

frigate's People

Contributors

theodlz avatar

Watchers

 avatar  avatar

frigate's Issues

distributions for nightly alerts, example filters

Defining next steps becomes easier once we start visualizing output. To avoid pathologies best to take at least three different cases.

While the project will be for the entire dataset, it makes sense to break it down into smaller pieces.

  • take data for three nights: (1) mostly high Galactic latitude, (2) more low Galactic latitude, (3) high-cadence night
  • for these simply allow parameter distributions, and x-y/corner plots (i.e. without any filtering) for a handful of parameters
  • repeat with filtered data from at least three filters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.