Plot ELPI data — aerosoltools 0.1.0 documentation

# Plot ELPI data

First we import the aerosoltools package

    [19]:

    import aerosoltools as at;

Next we import the ELPI data via the Load function. The filename variable should give the path and filename of the relevant dataset.

    [20]:

    filename = r"..\..\..\tests\data\Sample_ELPI.txt";
    ELPI_data = at.Load_ELPI_file(filename);

The data is now loaded and can be treated or plotted directly.

A quick way to visualize the data is via a timeseries plot, which can be done with a single line of code, as seen below. Here it is important to note, that the keyword y_3d is used to give a lower bound of 1 for the logarithmic colorbar. This was needed as some concentrations were reported as 0, which cannot be shown on a log scale.

    [22]:

    ELPI_data.plot_timeseries(y_3d=(1,0));

## Check Various metadata

We can also check various metadata loaded directly from the elpi data file

    [11]:

    # We can check the unit of the data. All load functions return number concentration data also if the original data file was in a different mode
    print(ELPI_data.unit)

    cm$^{-3}$

    [12]:

    # We can check the data type
    print(ELPI_data.dtype)

    dN

    [13]:

    # We can ensure that the correct instrument was stored
    print(ELPI_data.instrument)

    ELPI

    [14]:

    # We can check the density of the datafile, which should always be given in g/cm3
    print(ELPI_data.density)

    1.0