sanchez icon indicating copy to clipboard operation
sanchez copied to clipboard

Support for FY_2x?

Open bclswl0827 opened this issue 2 years ago • 11 comments

Is your feature request related to a problem? Please describe. Sanchez doesn't support add false colour to FY_2x.

Describe the solution you'd like Add support for FY_2x, including add country borders to its false colour image.

Describe alternatives you've considered Currently it's possible to add false color to FY_2x through GeoSatSignal and CLUT, but this software only supports Windows platform. (https://github.com/eswnl/FY-2x_CLUT)

Additional context None.

bclswl0827 avatar Dec 24 '21 03:12 bclswl0827

Sure thing. Do you have a sample image for me to use?

In the meantime, you should be able to add support by adding a section to the Satellites.json file - see here for details.

nullpainter avatar Dec 24 '21 03:12 nullpainter

Of course here is one from FY_2G

https://3pfy6f-my.sharepoint.com/:i:/g/personal/bclswl0827_3pfy6f_onmicrosoft_com/EcwWTl_AQiFBu-mDAwxsdzIBwN6Bo2OpH_hfodLB6Z7NYA

bclswl0827 avatar Dec 24 '21 04:12 bclswl0827

Thanks! Sanchez uses regular expressions against filenames to determine which satellite configuration to use for each image. Is FY-2x a standard prefix? Or is it FY-2[A-Z]? (e.g., FY-2C, FY-2G, etc.)

nullpainter avatar Dec 24 '21 05:12 nullpainter

Yes, FY_2x is standard prefix

bclswl0827 avatar Dec 24 '21 06:12 bclswl0827

Quick json file addition allows it to work, though your imagery has extra black space surrounding the earth and will have to have cropping adjusted to the json as well to properly line up everything. the crop settings below are just copied from another geo satellite. You can clearly see where the continents don't line up.

{
   "DisplayName": "FY-2H",
   "FilenamePrefix": "FY-2x_1_",
   "FilenameParser": "Goesproc",
   "Invert": false,
   "Longitude": 79.5,
   "Brightness": 1.2,
   "Crop": [
     0.003166,
     0.089925,
     0.001166,
     0.001010
   ]

FY-2x_1_20211101T055509Z-FC

creinemann avatar Dec 24 '21 13:12 creinemann

What software are you decoding with? I noticed some use the prefix FY_2x while the file you sent has FY-2x_

creinemann avatar Dec 24 '21 13:12 creinemann

SatDump :)

bclswl0827 avatar Dec 24 '21 15:12 bclswl0827

We can use a regex to support both prefixes. Are the filename date formats and the image alignment the same for all?

If so, all we require is more accurate crop values, as @creinemann noted above. Either you or I can work on this. You can either measure pixels or just divide and conquer.

I can then add the final config to git and create a new release.

nullpainter avatar Dec 24 '21 20:12 nullpainter

Yes, they're same for all.

bclswl0827 avatar Dec 26 '21 10:12 bclswl0827

unfortunately there will be a problem for exact FY-2H crop values, as every capture has drift. Sat orbit is unstable which results in xy offset on every image

sq7r0 avatar Jan 13 '23 06:01 sq7r0

unfortunately there will be a problem for exact FY-2H crop values, as every capture has drift. Sat orbit is unstable which results in xy offset on every image

I guess there's no EXIF metadata to indicate the offset, he says optimistically...

Before I hard-coded crop values, I had code which tried to guess the crop. This approach works okay for IR images. Perhaps I should resurrect it and use it for FY-2H. May be better than nothing?

nullpainter avatar Jan 14 '23 23:01 nullpainter