Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Better NO2 segmentation #11

Open
zxdawn opened this issue Feb 20, 2022 · 0 comments
Open

[Feature] Better NO2 segmentation #11

zxdawn opened this issue Feb 20, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@zxdawn
Copy link
Owner

zxdawn commented Feb 20, 2022

def segmentation(scn, min_threshold=4e14, max_threshold=1e15, step_threshold=2e14):
'''Segmentation the NO2 field by tobac
Tobac: https://gmd.copernicus.org/articles/12/4551/2019/
'''
logging.info(' '*4 + 'Segmentation of NO2 ...')
# get the finite no2 data
no2_finite = get_finite_scn(scn) # unit: molec./cm2
# Detect the features and get the masks using tobac
masks_scn = feature_mask(no2_finite, min_threshold=min_threshold,
max_threshold=max_threshold, step_threshold=step_threshold)
return masks_scn

The threshold is hardcoded. A better method is to use the monthly average NO2 as the minimum value of the threshold.

Because we are developing S5P-LNO2 for Arctic lightning NO2 (background NO2 is quite low), this doesn't matter at the current stage.

Please feel free to PR for making it work for polluted regions!

@zxdawn zxdawn added the enhancement New feature or request label Feb 20, 2022
@zxdawn zxdawn self-assigned this Feb 20, 2022
@zxdawn zxdawn changed the title Better NO2 segmentation [Feature] Better NO2 segmentation Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant