semvec/pypi-packages huggingface dataset:
segloss 0.0.1
Cost functions designed for semantic segmentation tasks, namely, Active Boundary Loss, Boundary Loss, Cross-Entropy Loss and Distance Trasform Loss.
Requires Python: >=3.8

# SEGLOSS: Semantic Segmentation Loss Functions

This project encompasses a list of three cost functions designed for semantic segmentation, to be available soo through the **SegLoss Package** [[PyPi link](https://pypi.org/project/openloss/)] so that it can be easily installed in your environment:

* ```segloss.ActiveBoundaryLoss(border_params=[0.1, 'cpu', True, 0.2, 0.01, 20.], ignore_index=255, weight=None)```
* ```segloss.BoundaryLoss(border_params=[3, 5, 0.5], ignore_index=255, reduction='mean', weight=None)``` 
* ```segloss.DistanceTransformLoss(border_params=[5,0.5,1.0], ignore_index=255, reduction='sum', weight=None)```

Our most recent contribution, the Distance Transform Loss (DTL), punishes deep networks when class boundaries are misclassified in exchange for more accurate contour delineations, an important aspect in the geological field.
DTL consists of four key steps: contour detection, distance transform mapping, pixel-wise multiplication, and the summation of all grid elements.

The proposed functions' API models the conventional cost functions available under the PyTorch framework so that it can be invoked according to the code block below:
```python
    import segloss
    import torch

    # Generate 12 samples randomly
    num_classes, num_samples, num_dims = 4, 12, 64
    images = torch.rand([num_samples, 3, num_dims, num_dims])
    labels = torch.randint(0, num_classes, (num_samples, num_dims, num_dims))

    # Feed criterion with both images and labels and compute loss
    criterion = segloss.DistanceTransformLoss(border_params=[1,0.5,1.0])
    loss_score = criterion(images, labels)
    loss_score.backward()
```

There is a notebook tutorial under construction, being implemented with the ```PyTorch``` framework as well as the ```SEGYIO``` library demonstrating how to use DTL in semantic segmentation applications. 
The tutorial showcases an experiment with the Netherlands' F3 Block volume, a publicly available seismic dataset that has been annotated by Yalaudah for the purpose of machine learning-based facies classification. This dataset is considered a valuable resource for researchers working in the field of geophysical data analysis and machine learning.
If you have further questions about the proposed approach, you can reach the corresponding author though the contact form available at [www.vareto.com.br](https://vareto.com.br/index.html#contact).
digisondeindices 2.1.0
Download and parse Digisonde data products.
Requires Python: >=3.7
Keywords: aeronomy, aurora, ionosphere

# Digisonde Indices
Digisonde Indices is a downloader and parser that retrieves Digisonde data from [DIDBase](https://giro.uml.edu/didbase/). Output datatype is [xarray.DataSet](https://docs.xarray.dev/en/latest/generated/xarray.Dataset.html). Missing data is returned as an empty dataset. 

### Data Selection:
1. CS is Autoscaling Confidence Score (from 0 to 100, 999 if manual scaling, -1 if unknown)
2. foF2 (MHz) - F2 layer critical frequency
3. foF1 (MHz) - F1 layer critical frequency
4. MUFD (MHz) - Maximum usable frequency for ground distance D
5. foE (MHz) - E layer critical frequency
6. hF (km) - Minimum virtual height of F trace
7. hF2 (km) - Minimum virtual height of F2 trace
8. hmE (km) - Peak height of E-layer
9. hmF2 (km) - Peak height F2-layer
10. hmF1 (km) - Peak height F1-layer
11. yF2 (km) - Half thickness of F2-layer, parabolic model
12. yF1 (km) - Half thickness of F1-layer, parabolic model
13. B0 (km) - IRI thickness parameter
14. TEC (m^-2) - Total electron content

### Example
Use from other scripts like:

```py
import digisondeindices as didbase
import datetime as dt

# timezone-unaware example
date = dt.datetime(2012, 1, 1, 5, 0, 0) # 2012-01-01 05:00:00 UTC, even though datetime object created in timezone of machine at runtime
inds = didbase.get_indices(date, 'AH223') # retrieve data from Ahmedabad station

# timezone-aware example
date = dt.datetime(2012, 1, 1, 5, 0, 0) # 2012-01-01 10:00:00 UTC for US/Eastern (UTC-05:00) given execution machine time zone is set to US/Eastern
inds = didbase.get_indices(date, 'AH223', tzaware=True) # retrieve data from Ahmedabad station
```
Returned indices are always in UTC (as `numpy.datetime64`).

A list of available stations is provided by the [Global Ionosphere Radio Observatory](https://giro.uml.edu/index.html):
[DIDBase stations list](https://lgdc.uml.edu/common/DIDBFastStationList)

## Data License
All GIRO measurements are released under CC-BY-NC-SA 4.0 license.
Please follow the [Lowell GIRO Data Center RULES OF THE ROAD](https://ulcar.uml.edu/DIDBase/RulesOfTheRoadForDIDBase.htm).
Requires acknowledgement of station data provider.