point-cloud-radar / bird-cloud-gnn

This package generates graph representations from point cloud data and fits graph neural networks for classification problem
Apache License 2.0
8 stars 2 forks source link

import from single file and pandas #86

Closed bart1 closed 1 year ago

bart1 commented 1 year ago

This should address #73

The following examples now work:

data_path = "/home/bart/ownCloudUva/labels/tmpAnnotated/"
features = [
    "range",
    "azimuth",
    "elevation",
    "x",
    "y",
    "z",
    "DBZH",
    "DBZV",
    "TH",
    "TV",
    "PHIDP", "RHOHV",
]

runfile('/home/bart/bird-cloud-gnn/bird_cloud_gnn/radar_dataset.py', wdir='/home/bart/bird-cloud-gnn/bird_cloud_gnn')
# 5 first files result in 5981 graphs
import pandas as pd
a=pd.read_csv("/home/bart/ownCloudUva/labels/tmpAnnotated/NLDHL_pvol_20200415T0620_6234.h5.csv.gz")
dataset3 = RadarDataset(
    data=a,
    features=features,
    target="BIOLOGY",
    max_distance=1650.0,
    min_neighbours=30,
    max_edge_distance=50.0,
)

dataset1 = RadarDataset(
    data="/home/bart/ownCloudUva/labels/tmpAnnotated/NLDHL_pvol_20200415T0620_6234.h5.csv.gz",
    features=features,
    target="BIOLOGY",
    max_distance=1650.0,
    min_neighbours=30,
    max_edge_distance=50.0,
)

dataset2 = RadarDataset(
    data=data_path,
    features=features,
    target="BIOLOGY",
    max_distance=350.0,
    min_neighbours=100,
    max_edge_distance=50.0,
)
bart1 commented 1 year ago

@lyashevska what do you use to run tests locally? Then I can improve them

abelsiqueira commented 1 year ago

We use pytest -v. Check the README.dev.md for the info on how to setup.

abelsiqueira commented 1 year ago

To lint we use pre-commit. You can install with the pip install --no-cache-dir -e .[dev]' and thenpre-commit install. Then run withpre-commit run -a`, or when you make a commit it will run automatically.

bart1 commented 1 year ago

@abelsiqueira Took a while but it now seems to work!

bart1 commented 1 year ago

Now the rename is also done

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

87.5% 87.5% Coverage
0.0% 0.0% Duplication