Giter Club home page Giter Club logo

colliderscope's People

Contributors

jacanchaplais avatar

Stargazers

 avatar

Watchers

 avatar

colliderscope's Issues

Add scatter plots in eta phi plane

Implement using plotly and pandas.

Something like this
image

Add option for superimposing extra particles, eg. those which aren't in final state.

Needs to be able to pass numpy arrays for everything, including masks.

Add network graph

Network visualisation

Should enable visualisation of an undirected network, similar to a scatter plot of the final state, but with edges connecting the particles.

network

This example was originally written to evaluate the success of a clustering model.

# assuming exist ParticleSet object at final_pcls
x = final_pcls.pmu.eta
y = final_pcls.pmu.phi
dR = gcl.matrix.delta_R_aff(final_pcls.pmu)
adj_matrix = gcl.matrix.cut_adj(dR, conf.dataset.radius)
degrees = adj_matrix.sum(axis=0)

def edge_pos(pcl_pos: npt.NDArray[np.float64], adj: npt.NDArray[np.bool_]) -> list[list[Optional[float]]]:
    edges = []
    for ux, row in zip(pcl_pos, adj):
        for vx in pcl_pos[row]:
            edges += [ux, vx, None]
    return edges

edge_trace = go.Scatter(
    x=edge_pos(x, adj_matrix), y=edge_pos(y, adj_matrix),
    line=dict(width=0.5, color="#686a72"),
    hoverinfo="none", mode="lines",
    showlegend=False,
)

node_trace = go.Scatter(
    x=list(x),
    y=list(y),
    mode="markers",
    hoverinfo="text",
#     text=list(final_pcls.pdg.name),
    text=list(map("degree={}, confidence={:.3f}".format, degrees, preds)),
    showlegend=False,
    marker=dict(
        showscale=True,
        symbol=labels,
        colorscale='Bluered',
        reversescale=True,
        color=degrees,
        size=10,
        colorbar=dict(
            thickness=15,
            title='degree',
            xanchor='left',
            titleside='right'
        ),
        line_width=1
    ),
)

fig = go.Figure(
    data=[edge_trace, node_trace],
    layout=go.Layout(
        title='Input graph data structure',
        titlefont_size=16,
        hovermode='closest',
        margin=dict(b=20,l=5,r=5,t=40),
        xaxis=dict(showgrid=True, zeroline=False, showticklabels=True, title_text="Pseudorapidity"),
        yaxis=dict(showgrid=True, zeroline=False, showticklabels=True, title_text="Azimuth"),
        )
    )
fig.show()
fig.write_html(fig_dir / f"{num:02}-preds-degree.html")

Features

Core

  • connectivity: for simplicity, compute the radius-based edges automatically, rather than taking as input
  • colour bar: provide input for colours, eg. $p_T$ or confidence score, etc.
  • inputs: should take either full 4-momentum, 3-momentum, or $\phi, \eta$ as inputs
    • for the moment, just accept 4-momenta, but will do some refactoring later

Additional

  • different symbols: allow particles to be assigned to different groups, with unique marker symbols
  • annotations: enable additional information to be included on cursor hover, eg. particle name / PDG

Vectorize Histogram.update() method

Histogram.update() currently takes one value at a time. Enable the val parameter to be an iterable s.t. pre-computed arrays can be efficiently binned, and the user doesn't have to resort to iteratively calling Histogram.update().

Add Histogram.from_numpy classmethod

Enable initialisation of Histogram from pre-computed histogram data, specifically in the format outputted from numpy.histogram(), ie. a two-tuple of arrays containing counts and bin edges, respectively. Should also contain an optional total parameter, which normalises the density with respect to the total number of values, rather than those just present in the bin range.

Update colliderscope web UI with graphicle 0.3

Dependency issues as the API for graphicle changed between versions 0.2 and 0.3. Additionally, can make use of the graphicle.select.clusters() function.

Maybe add some unit tests that periodically run, to ensure the integration of these packages is consistent.

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.