-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
common vis features #8
Comments
Looks interesting! Should we do a demo with you, @dsavchenko , maybe @andriineronov ? Today 15h? |
Ok for me |
Works for me too, like I said at the other meeting not everything is working and there's still some bugs but would be nice too know if it's going in the right direction |
Ok for me as well |
Changes are available on branch https://github.com/esg-epfl-apc/astrojsvis/tree/jsvis-prototype This is still work in progress so there are still things that are not finished and I haven't tested everything. The main parts are components, wrappers and visualizations. Most of the flow between them is handled through events that are dispatched to different elements or objects that listen to specific event that are relevant to them. Standard flow is :
Components contains the four main interface components (Graph, Settings, Header, Data). Each component inherits from HTMLElement and is responsible for all the elements inside it. All events originating from inner elements are handled by the component that will dispatch them or use them according to the event type. Wrappers are used to interact with different libraries (Bokeh, D3 and fits-reader right now), they communicate with components through events like 'fits-loaded' that let every event subscribing component know that a fits file has been loaded and is available. They are responsible for providing their library with the necessary settings they need to instantiate their visualizations and they use specific DataProviders to process the data according to user choices before sending them to a vis library. Visualizations contains the classes that are directly responsible for instantiating visualizations given a set of parameters provided by the user through their respective wrappers. I tried to reduce the d3 code as much as possible and everything is now "encapsulated" in different functions so I hope it is more clear that way. DataProcessors are responsible for processing data from hdus for specific data type (light curve, spectrum.....). There was a comment about adding support for binning so I started making things but not sure if what I started makes sense. Basically user could choose between binning strategies (time based, arbitrary bin size) and provide a time frame or bin size for the binning process, user can also choose between different method to calculate the bin rate value like min, max, mean, weighted mean based on fracexp etc..... Helpers represents various utility classes (right now only TimeHelper), I don't know if it's useful but since there could be different time format jd, mjd..... and time based binning I thought maybe it could be of use. Also in mohamed heavens project the user has the possibility to choose between different formats like decimal years. Events contains the main events that might need more specific behavior than standard CustomEvent, they are dispatched to subscribers or different part of the dom depending on which type of object is listening to them. Settings contains the settings object that the settings component use to communicate with the wrappers and the configuration object that is used by the wrappers to let the component know what part of its interface should change depending on the user library choice. Containers contains different kinds of containers that are responsible for instantiating specific objects and make them available to the other classes Registries right now only holds the registry that keeps tracks of which events components have subscribed to Errors a few specific exceptions mostly events and fits related Work in progress :
|
Changes have been pushed to the branch https://github.com/esg-epfl-apc/astrojsvis/tree/jsvis-prototype
Everything seems ok otherwise just need to finish error bars processing for D3 and probably some small bugs here and there. There's still the questions I mentioned about binning and time handling in the previous comment too. Will make another comment with screenshots and snippets to illustrate |
Please open PR, @francoismg |
PR is available here : #12 |
select file and fields to plot in a generic case
https://esg-epfl-apc.github.io/astrojsvis/
The text was updated successfully, but these errors were encountered: