Giter Club home page Giter Club logo

tomplot's People

Contributors

tommbendall avatar witt-d avatar

Watchers

 avatar  avatar

Forkers

jdbetteridge

tomplot's Issues

Script hangs when plotting a constant field

I don't know if this is a big issue, as you don't often want to plot a completely constant field! However, I noticed this when trying to verify that my initial field was indeed a constant value.

1-Dimensioanl plots

It would be nice to have the functionality to plot a diagnostic/prognostic along just one axis.

For example, a plot of temperature against height at a given horizontal point

Reshaping Layers doesn't work as intended

The reshape function doesn't order the data points properly and will mix up different heights and not reshape correctly.
The original code

# for lev_idx in range(num_levels):
    #     data_slice = slice(lev_idx, num_hori_points*num_levels+lev_idx, num_levels)
    #     field_data[:, lev_idx] = data['field'].values[data_slice]
    #     coords_X[:, lev_idx] = data['X'].values[data_slice]
    #     coords_Y[:, lev_idx] = data['Y'].values[data_slice]
    #     coords_Z[:, lev_idx] = data['Z'].values[data_slice]
    #     for idx, _ in enumerate(other_arrays):
    #         new_other_arrays[idx][:, lev_idx] = data[f'other_{idx}'].values[data_slice]

The Hack fix

for hori_point in range(num_hori_points):
        hori_index = hori_point*num_levels
        this_X, this_Y = data['X'].values[hori_index], data['Y'].values[hori_index]
        data_column = data[(np.isclose(data['X'], this_X)) &
                           (np.isclose(data['Y'], this_Y))]
        data_column = data_column.sort_values(by=['Z'])
        field_data[hori_point,:] = data_column['field'].values[:]
        coords_X[hori_point,:] = data_column['X'].values[:]
        coords_Y[hori_point,:] = data_column['Y'].values[:]
        coords_Z[hori_point,:] = data_column['Z'].values[:]
        for idx, _ in enumerate(other_arrays):
            new_other_arrays[idx][hori_point,:] = data_column[f'other_{idx}'].values[:]

Vertical slice data should be ordered

I'm not sure that the vertical slice data is ordered by horizontal coordinate, which means it can't be used with the "contour" method. This should be straightforward to do.

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.