Skip to content

Commit

Permalink
/deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Jan 31, 2025
1 parent abd4dcd commit e7d2a69
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 22 deletions.
89 changes: 67 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,52 @@ pip install podaac-forge-tig-config-generator

### Creating a Configuration Generator Instance
```python
from hitide_config_generator import HiTideConfigGenerator
from podaac.podaac_forge_tig_config_generator.generate_config import HiTideConfigGenerator
import json

config_generator = HiTideConfigGenerator(
short_name="example_dataset",
lat_var="latitude",
lon_var="longitude",
is360=False,
time_var="time",
tiles={"x": 10, "y": 10},
global_grid=True,
footprinter="forge-py",
tolerance=0.01,
strategy="opencv",
opencv_params={"blur": 5, "threshold": 127},
alpha_shape_params={"alpha": 0.5},
img_variables=["var1", "var2"],
strategy="open_cv",
opencv_params={
"pixel_height": 1000,
"simplify":0.3,
"min_area": 30,
"fill_value": -99999.0,
"fill_kernel": [30,30]
},
alpha_shape_params={
"alpha":0.2,
"thinning": {"method": "bin_avg", "value": [0.5, 0.5]},
"cutoff_lat": 80,
"smooth_poles": [78,80],
"simplify" : 0.3,
"min_area": 30,
"fill_value": -99999.0
},
img_variables=[
{
"id": "sses_bias",
"min": "-18.85",
"max": "19.25",
"palette": "paletteMedspirationIndexed"
},
{
"id": "sses_standard_deviation",
"min": "-18.85",
"max": "19.25",
"palette": "paletteMedspirationIndexed"
}
],
image={"ppd": 8, "res": 16}
)
config = config_generator.generate()
print(json.dumps(config, indent=4))
```

### Generating and Saving the Configuration
Expand Down Expand Up @@ -81,26 +109,39 @@ The generated configuration includes:
"lonVar": "longitude",
"is360": false,
"timeVar": "time",
"global_grid": true,
"footprinter": "forge-py",
"footprint": {
"strategy": "open_cv",
] "open_cv": {
"pixel_height": 1000,
"simplify":0.3,
"min_area": 30,
"fill_value": -99999.0,
"fill_kernel": [30,30]
"open_cv": {
"pixel_height": 1000,
"simplify": 0.3,
"min_area": 30,
"fill_value": -99999.0,
"fill_kernel": [
30,
30
]
},
"alpha_shape": {
"alpha":0.2,
"thinning": {"method": "bin_avg", "value": [0.5, 0.5]},
"cutoff_lat": 80,
"smooth_poles": [78,80],
"simplify" : 0.3,
"min_area": 30,
"fill_value": -99999.0
"alpha": 0.2,
"thinning": {
"method": "bin_avg",
"value": [
0.5,
0.5
]
},
"cutoff_lat": 80,
"smooth_poles": [
78,
80
],
"simplify": 0.3,
"min_area": 30,
"fill_value": -99999.0
}
} },
},
"imgVariables": [
{
"id": "sses_bias",
Expand All @@ -114,7 +155,11 @@ The generated configuration includes:
"max": "19.25",
"palette": "paletteMedspirationIndexed"
}
]
],
"image": {
"ppd": 8,
"res": 16
}
}
```

Expand Down
4 changes: 4 additions & 0 deletions podaac/podaac_forge_tig_config_generator/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
"minItems": 2,
"maxItems": 2,
"description": "Kernel size for filling small gaps, optional."
},
"fill_value": {
"type": "number",
"description": "Fill value for invalid areas, optional."
}
},
"additionalProperties": false,
Expand Down

0 comments on commit e7d2a69

Please sign in to comment.