1. Polaris: Produce rich analysis
reports
Libre Space Foundation
Issue #135 Figuring out how to make Polaris reports
Ayush Bansal
Indian Institute of Technology Roorkee, Roorkee, India
2. Name and contact Information
Name: Ayush Bansal
Email: ayu023ban@gmail.com (preferred), ayush_b@ec.iitr.ac.in (alternate)
Riot: @ayu023ban:matrix.com
Portfolio: https://ayushbansal.me
Github: ayu023ban
Linkedin: https://www.linkedin.com/in/ayush-bansal-2b00b0192/
Location: Rajasthan, India
Time Zone: Kolkata INDIA, UTC+5:30
INTRODUCTION
The Polaris fully open source project aims at analyzing spacecraft
telemetry, learning from it, keeping operators aware, and generating
knowledge transferrable to other missions.
The Polaris project aims at providing open source functional tools to
support space operators using machine learning and Deep Learning.
Currently It has 3 major components:
Polaris fetch: Fetches telemetry data from various sources like SATNOGS
DB, TLE.
Polaris Learn: Learns Correlation between different parameters and
generates dependency graph.
Polaris viz: Visualise dependencies in form of interactive 3-d graph.
Also it has another component `polaris batch` to automate above three
components.
Currently we have basic tools for the visualisation of the dependency
1
3. graph, but we don’t have any visualisation tool to show the anomaly
detected. Moreover the 3-d graph of the dependency graph is not
printable(it’s 3d!!).
This project aims to make tool to use results of betsi and anomaly detectors
to generate customisable and rich analysis Reports and make interactive
graphs which can be exported in multiple formats.
Mentors
- Red Boumghar (@redsharpbyte)
- Xabi Crespo Alvarez (@crespum)
- Hugh Brown (@saintaardvark)
- Patrick Dohmen(@DL4PD)
Primary Features Of The Project
Provide a visual module for polaris that uses results of anomaly detector
and raw data to generate graph.
1. Make a Browser based local web server to serve interactive graphs to
see different anomalies, their point of occurrences in frames, in
different parameters.
2. Develop a pdf generator to output the results of the graphs and basic
summary(like number of anomalies detected, time-period, etc.) User
would be able to choose which parameters he/she wants to put in the
pdf along with a customizable time-period of the data.
3. Develop option to bind all the graphs in a bundle and provide as zip
file to further use.
4. Command-line option to trigger the reports.
2
4. How will it benefit Libre Space Foundation and ESA (European
Space Agency) objectives?
- It will assist the experts who are there at different ground stations
analyzing the telemetry data and monitoring the health status of the
spacecraft.
- It will increase the efficiency to study anomalies as users will be able
to generate full reports on entering one command and thus gives
more time to eliminate them.
What interests me about this project?
I like working with things related to communications and signals. And
Satellite constellations are a very big example of coordinated paths. There
is a huge role of communication between them. Automating them is one of
the primary goals of Polaris and being part of such a project which aims to
promote autonomy excites me the most. As we have recently seen
companies like SpaceX and BlueOrigins have been planning to send its own
massive satellite constellations (Starlink is already in beta phase in some
places) So in the very near future autonomy will be necessary. Contributing
in the whole space field by the project inspires me.
Proposed Workflow
Understanding Anomaly Detector:
A satellite when in space has many parameters which when go beyond a
certain limit of their expected values can possess a threat. There are
hundreds of parameters (or better called states) of satellites such as battery
voltage, bus current, temperature, coordination etc. We collect the values
3
5. of states (called frames) at different places of earth and collect them at
various open source databases like SATNOGS DB. Then Anomaly Detector
uses half of it’s data to train it’s model and remaining is used to detect the
anomalies.
Solution:
I thought of a solution of upgrading the anomaly detector from a single file
to a whole module.Then we will have 4 sub modules: fetch, learn, viz and a
new sub module Polaris detect.
Polaris Detect
I am proposing making a user interface in which the user can select how
many parameters the user wants to see. Then for each selected parameter
there will be a graph showing The value of parameter over time-period,
The Graphs will be Intractable - users can zoom different time periods to
see the zoomed version of the graph.
The value generated by autoencoder, and special data points for outliers
(for outliers > 2σ and for outliers > 4σ)
4
6. Data to be shown:
● For a particular parameter:
1. Actual Values of the parameter.
2. Autoencoder values for the parameter.
3. Outliers as points for specific standard deviations (2σ, 4σ, 8σ).
4. RRCF (Robust Random Cut Forest) Anomaly Score.
● Summary Plots:
1. Bar Chart Or Pie Chart showing Anomaly count from each
parameter.
Graphs
The user can look at the time-series graph of each parameter along with
highlighted outliers if any. Along with these, There will also be some
statistical graphs like a bar graph for which parameter gave how many
outliers.
User Interface:
The user interface will be something like the wire-frame attached:
5
8. Here is the link for the wire-frame for more clear details.
In The top there will be a nav-bar which will contain a logo, brand-name
and link to the main website.
Then coming forward there will be one or two charts(bar or pie) showing
summary of which parameters gave how many outliers.
Then there will be a multi-select searchable dropdown containing a list of
all the parameters. Below this There will be separate graphs for each
parameter showing Data above mentioned in section “Data to be shown”.
Apart From This there will be three more buttons for:
● Generate Complete Report for all the parameters
● Generate Report for the selected parameters
● Export All The Graphs.
Tech Stack:
I propose use of React for the webserver.
Reasons for using ReactJs:
1. Very small learning curve for new developers.
2. Hugh Community support for documentation.
3. Lots of Charts and Graphs libraries.
4. I have a very good experience in ReactJs which will help in increasing
efficiency.
For Charts I like to use one of the following Libraries:
1. React Timeseries Charts
2. Recharts
Other Libraries:
7
9. 1. Redux
2. Material UI
Both the libraries for charts are popular. React Timeseries Charts have
special charts optimised for time series data with which we mostly deal.
Recharts has the largest community support and is well stable.
For PDF Generation I would like to use react-pdf as It supports rendering of
charts with great ease.
Note: The libraries for charts and pdf generators are debatable so I would
be more than happy to discuss other options too for this to work.
Additional Features To Implement if Time available:
-- Export CSV Files for the anomaly Detector in proper format
-- Integrate with MLFlow ui to store models of anomaly detector for the
record.
Things to put off if Time takes longer than expected:
-- PDF generation
-- Export graphs in zip format.
Timeline
Community Bonding Period (May 17 - June 7)
-- Remain in Constant touch with my mentors and community.
-- Explore Different Libraries for different types of Charts and graphs.
8
10. -- Make general Structure of json output of the Anomaly Detector.
-- Define the minute details of the project
June 7 - June 21 (2 week)
-- Complete remaining functions and tests of Anomaly detector to process
data generated by polaris fetch -> The functions to build are:
● Function to initiate cleaner to clear constant and NaN values.
-- Implement Config file for the anomaly detector (layer dimensions,
activations, etc.)-> The Classes to build are:
● Detector_configurator
June 21 - July 4 (2 week)
-- Implement functions to output the result of detector in decided json
format -> The functions to build are:
● Output_predictions
-- Make Command line system for new command polaris detect to automate
the steps from command line -> The function to build are:
● cli_detect(...args)
Note: as @adithyav1511 (@MajorCarrot) is currently working on anomaly
detector so it may be possible that some of the functions would already be
built when the time comes.
July 4 - July 11 (1week)
-- Make Mockups and design for the web page and decide themes and color
9
11. pallete.
-- Make Actions and Reducers (functions to store and change global state of
the applications) and basic util functions for different functionality.
-- Set theme and color theme in.
Phase 1 evaluations(1week, july 12 - july 16)
-- Submit the code for phase evaluations
-- Discussion with mentors about the bugs and scope of improvement.
June 16 - July 23 (2 week)
-- Implement methods to get the interactive charts.
-- Implement controls for users to decide how many charts and which
parameters the user wants to see.
July 23 - July 30 (1 week)
-- Complete Implementation of Interactive Charts and Graphs on the local
web server
-- Make Components for PDF Generation
-- Add sub command --generate in the polaris detect command
July 30 - Aug 7 (1 week)
-- Complete all PDF Generation functionality
10
12. -- Implement Export Graphs Functionality
Aug 7 - Aug 16 (1 week)
-- Wrapping up the remaining Functionality if any
Phase 2 evaluations(1week, Aug 16 - Aug 23)
-- Complete the project
-- Final testing
-- submit the final report.
Deliverables
The deliverables of the GSoC project are as follows:
● Extended Command line system to detect anomalies from
polaris fetch data.
● WebPage to view and interact with Charts and graphs of the
results of anomaly detector.
● Implement Functionality of generating pdf of the charts and
reports generated.
● Functionality of Exporting all the plots and graphs in zip
format.
11
13. Milestones
● Phase-1: A Command line subsystem of polaris giving output of
anomaly detector as a json output, Mockups of The webpage and
PDF.
● Final Evaluation: Complete working webpage showing all the
graphs of the outliers, summary count of the outliers,
Functionality of generate pdf and generate images of plots in
zip.
Acknowledgment
I have thoroughly gone through the GSoC StudentInfo page and GSoC
Manifest page. I hereby assure that I will abide by the rules and
regulations. I also assure that I will communicate with the assigned mentor
regularly, maintain thorough transparency and keep my work up to date.
Commitments
I do not have any other work or commitment during the GSoC period. I will
have my 4th semester final exams in may but it will be completed before
the results of the Students projects would be announced. I am mostly
familiar with the codebase of Polaris so this would help me during the later
weeks of community bonding period so that I can start developing the
12
14. portal even before the coding phase. I would be able to devote 35-40 hours
per week on average.
Personal Details
I am a second year undergraduate at Indian Institute of Technology
Roorkee doing my majors in Electronics and Communication Engineering.
My areas of interest are software development, web development and
signal and systems. I am proficient in Python, Javascript, C++ and Java. I
am familiar with git and I work regularly on Github and now Gitlab also. I
haven’t contributed much to open source till now, but I’ll really like to
contribute to Polaris and Libre space organisation and make it my first
remarkable experience. I am proficient in two human languages including
English.
Experience and Projects:
I have the experience of working closely with a team as I am an active
member of Information Management Group at IIT Roorkee, a bunch of
passionate enthusiasts who manage the institute main website, internet
and intranet activities of the university and the placement portal. My
major project as a part of the group is R-drive, a cloud based personal files
managing portal used by unique 4k campus students and faculty every
month. This project has been implemented on Django-Rest(python based
framework) and ReactJs (javascript based framework). Here is the link for
frontend repository and backend repository. Note: This is available only
for the students of IIT Roorkee
I have also been responsible for the development of Powerplay, a
construction management startup as an intern which handles more than
13
15. 100k users. This project is based on NodeJs(backend) and ReactJs(frontend).
Here is the link for the project.
Apart from this I have made some self projects also. One of them is
tic-tac-toe. It is a browser based game having both multiplayer and single
player mode (AI based Backtracking algorithm for computers to decide the
next move). Here is the link for the game. The game is full of animations
and fully mobile friendly. Here is the link for the repository of the game.
For other projects you can refer to my profile at github.
Contributions to Polaris:
I started off with Polaris in March 2021. To get familiarized with the code, I
made the following contributions to the code base:
1. Merge Request !170: Help screen for all the keyboard shortcuts
2. Merge Request !165: Add functionality of toggling visibility of labels
of graph
3. Merge Request !168: Resolve bug by Replacing data by data_features
in extraction.py
4. Merge Request !163: Replace old url deepspace.space to new url
polarisml.space/demo to avoid redirect
5. Merge Request !174: Change Shortcuts which interfere with browser’s
default shortcuts
6. Merge Request !138: Update old url deepspace.space to new demo url
polarisml.space/demo to avoid redirect (in polaris.space hugo site)
7. Reported Issue #14: Add pytest library to install in setup.py (in Betsi)
I will always be available on email or at Element(Matrix) for any kind of
14
16. discussion or query.
I am highly interested in contributing to Polaris even after the GSoC period.
Here is the link to my CV.
15