#1842 closed defect (fixed)
Petascope_Support scaling on irregular axes in WCS/WCPS
Reported by: | Bang Pham Huu | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 11.0 |
Component: | petascope | Version: | development |
Keywords: | Cc: | Dimitar Misev, Vlad Merticariu | |
Complexity: | Medium |
Description
Currently, Petascope doesn't support scale down/up for irregular axes. Hence, coverage contains irregular axis cannot be encoded in netCDF (server killed) as because of redundant/lack of coefficients compared to the number of scaled grid pixels.
The scaling down on irregular axes should follow the same way in Rasql to match the coefficients with selected grid pixels.
The scaling up on irregular axes need to find a way to find the coefficients which don't exist from the scaling up grid pixels. The formula to get the missing coefficients on irregular axes will be the reversed of this formula: https://stats.stackexchange.com/questions/281162/scale-a-number-between-a-range/281164#281164
Change History (9)
comment:1 by , 6 years ago
comment:4 by , 6 years ago
Cc: | removed |
---|---|
Milestone: | 9.7 → 9.8 |
comment:5 by , 6 years ago
The formula to find the cell numbers in rasql for scaling down is:
scaleRatio = (source.hi - source.lo + 1) / (dest.hi - dest.lo + 1) realIndex = 0 intIndex = 0 loop from 0 until intIndex < source.hi: realIndex += scaleRatio intIndex = int(realIndex)
// e.g: source = [0:11], dest = [0:6] scaleRatio = (11 - 0 + 1) / (6 - 0 + 1) = 1.7142857142857142 >>> int(0) 0 >>> int(1.7142857142857142 * 1) 1 >>> int(1.7142857142857142 * 2) 3 >>> int(1.7142857142857142 * 3) 5 >>> int(1.7142857142857142 * 4) 6 >>> int(1.7142857142857142 * 5) 8 >>> int(1.7142857142857142 * 6) 10 Then, `0, 1, 3, 5, 6, 8, 10` are the numbers from `source` which are used to contribute to `dest`.
comment:6 by , 5 years ago
Milestone: | 9.8 → 10.0 |
---|
comment:7 by , 5 years ago
Milestone: | 10.0 → Future |
---|
comment:8 by , 5 years ago
Milestone: | Future → 11.0 |
---|
comment:9 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
@bbell can you point Bang to the correct r_MiterX source file that does the scaling in rasdaman?