Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

ValueError: Unsupported bitpacked QA value 0 #29

Open
123helloworld123 opened this issue Jul 26, 2017 · 1 comment
Open

ValueError: Unsupported bitpacked QA value 0 #29

123helloworld123 opened this issue Jul 26, 2017 · 1 comment

Comments

@123helloworld123
Copy link

Hey,

When i am using pyccd (https://github.com/USGS-EROS/lcmap-pyccd/tree/release/2017.06.20). I choose the test data, "test_3657_3610_observations.csv" in the resources folder. however, i got an error: ValueError: Unsupported bitpacked QA value 0

i am wondering why i got a error when i use the dataset you provided?

Thanks

@klsmith-usgs
Copy link
Collaborator

klsmith-usgs commented Aug 11, 2017

pyccd is designed to use bit-packed QA values and 0 is an undefined value. The test data sets were gathered during an earlier revision of the input data that we are targeting.

You can override the default by passing in a dictionary with the appropriate values (see parameters.yaml) then pass it in to ccd.detect:

>>> import ccd
>>> params = {'QA_BITPACKED': False,
              'QA_FILL': 255,
              'QA_CLEAR': 0,
              'QA_WATER': 1,
              'QA_SHADOW': 2,
              'QA_SNOW': 3,
              'QA_CLOUD': 4}
>>> results = ccd.detect(dates, blues, greens, reds, nirs, swir1s, swir2s, thermals, qas, params=params)

If you check the tests, that is what is done for those data sets:
https://github.com/USGS-EROS/lcmap-pyccd/blob/develop/test/test_ccd_detect.py#L14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants