geodesymiami / insarmaps

3 stars 0 forks source link

enhancement: adaptive color scale limits #3

Closed falkamelung closed 5 years ago

falkamelung commented 5 years ago

Hi Alfredo, there is another minor issue. When you display one data set, the default color scale is always between -2 and 2 cm/yr, which is not practical for large deformation. It would be preferred to extract the minimum and maximum and then take 50% of the highest or lowest value. Lets do 50% now but possible change if the initial display is not good (examples below). There should be some rounding, so that we don’t end up with a scale between -3.71 and +3.71 ). Possible permissible values are also below. So I would suggest to do max(data)/5 and select teh closest value.

Thank you! Falk

Min(data)=-5 Max(data)=20 —> colorscale [-10,10]

Min(data)=-6 Max(data)=2 —> colorscale [-3,3]

Permissible values:

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.5 2 3 4 5 6 7 8 9 10 15 20 30 40 50 60 70 80 90 100 150 200 300 400 500 600 700 800 900 1000

stackTom commented 5 years ago

implemented. can you try it at this link: http://ec2-18-191-170-57.us-east-2.compute.amazonaws.com/

falkamelung commented 5 years ago

Welcome back! I am glad you found some spare time to work on this!

I did the command below, but I don’t see any changes?? It still shows a color scale from -2 to 2. It should show a colorscale ranging for -100 to 100 or similar ???

http://ec2-18-191-170-57.us-east-2.compute.amazonaws.com/https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fec2-18-191-170-57.us-east-2.compute.amazonaws.com%2F&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Cba0c3112644c4465336708d6b7edc954%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636898629250817641&sdata=z2mNlnsopXXM3oXGxr5qDBK9ndDOxl8KHg13EZayBtw%3D&reserved=0start/-0.008/-78.0/7?startDataset=S1_IW1_128_0593_0597_20180713_XXXXXXXX

[cid:134BF736-1412-4467-8A3A-284B0BBFB0FA] http://insarmaps.miami.edu/start/-0.008/-78.0/7?startDataset=S1_IW1_128_0593_0597_20180713_XXXXXXXX

http://insarmaps.miami.edu/start/-0.008/-78.0/9?startDataset=http://insarmaps.miami.edu/start/-0.008/-78.0/9?startDataset=S1_IW_005_0000_20141006-XXXXXXXX_0000_00000S1_IW3_021_0485_0489_20160118_XXXXXXXX


Falk Amelung Professor Department of Marine Geosciences Rosenstiel School of Marine and Atmospheric Sciences University of Miami 4600 Rickenbacker Causeway Miami, FL 33149 USA Tel: 305 421 4949 E-mail: famelung@rsmas.miami.edumailto:famelung@rsmas.miami.edu Web: http://insar.rsmas.miami.edu InSAR data: http://insarmaps.miami.edu

On Apr 2, 2019, at 10:35 PM, stackTom notifications@github.com<mailto:notifications@github.com> wrote:

implemented. can you try it at this link: http://ec2-18-191-170-57.us-east-2.compute.amazonaws.com/https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fec2-18-191-170-57.us-east-2.compute.amazonaws.com%2F&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Cba0c3112644c4465336708d6b7edc954%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636898629250817641&sdata=z2mNlnsopXXM3oXGxr5qDBK9ndDOxl8KHg13EZayBtw%3D&reserved=0

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeodesymiami%2Finsarmaps%2Fissues%2F3%23issuecomment-479336464&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Cba0c3112644c4465336708d6b7edc954%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636898629250827641&sdata=MXux4GK0SegczAymKQBJAlqv0G%2FJnZrHe2tcRzBPJ5c%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKpT3EpgCRq3xWABMbnnP9e7FaIxz335ks5vdC-KgaJpZM4afltO&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Cba0c3112644c4465336708d6b7edc954%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636898629250827641&sdata=HlcBQ0wCLMM4Dqoq%2F75znCQ3eHlherud6XaKO1RmGzQ%3D&reserved=0.

stackTom commented 5 years ago

I tried this link: http://ec2-18-191-170-57.us-east-2.compute.amazonaws.com/start/-0.008/-78.0/7?startDataset=S1_IW1_128_0593_0597_20180713_XXXXXXXX

According to the database, the minimum value is -2.65425125899672 and the maximum value is 4.3477865168459795. According to the logic in the first post, the max would be 4.3. 50% of that is around 2.15, and the closest value to this is 2 (hence the color scale -2 to 2). Is my logic wrong? Or maybe the database query didnt find the correct min and max values (possible but unlikely, as it is a builtin function in postgresql).

stackTom commented 5 years ago

Here is an example that sets it to -15 and 15: http://ec2-18-191-170-57.us-east-2.compute.amazonaws.com/start/-0.008/-78.0/7?startDataset=S1_IW12_161_0620_0623_20180101_XXXXXXXX

falkamelung commented 5 years ago

Falk Amelung Professor Department of Marine Geosciences Rosenstiel School of Marine and Atmospheric Sciences University of Miami 4600 Rickenbacker Causeway Miami, FL 33149 USA Tel: 305 421 4949 E-mail: famelung@rsmas.miami.edumailto:famelung@rsmas.miami.edu Web: http://insar.rsmas.miami.edu InSAR data: http://insarmaps.miami.edu

Yes, the min and max values are wrong. Are you sure you are querying the min and max of the velocity over the shown time period? Or there could be a unit issue? This dataset has a max of about 100 cm/yr, not 4.4 (see attached screenshot).

On Apr 3, 2019, at 10:31 AM, stackTom notifications@github.com<mailto:notifications@github.com> wrote:

I tried this link: http://ec2-18-191-170-57.us-east-2.compute.amazonaws.com/start/-0.008/-78.0/7?startDataset=S1_IW1_128_0593_0597_20180713_XXXXXXXXhttps://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fec2-18-191-170-57.us-east-2.compute.amazonaws.com%2Fstart%2F-0.008%2F-78.0%2F7%3FstartDataset%3DS1_IW1_128_0593_0597_20180713_XXXXXXXX&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Ca80d5307ac3247ca57c008d6b851cb39%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636899058774080743&sdata=%2Bqf92M4Sx7imHH%2F%2Fpo%2BKnE8d8E%2BEmCSY7G%2FCPsoMenk%3D&reserved=0

According to the database, the minimum value is -2.65425125899672 and the maximum value is 4.3477865168459795. According to the logic in the first post, the max would be 4.3. 50% of that is around 2.15, and the closest value to this is 2 (hence the color scale -2 to 2). Is my logic wrong? Or maybe the database query didnt find the correct min and max values (possible but unlikely, as it is a builtin function in postgresql).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeodesymiami%2Finsarmaps%2Fissues%2F3%23issuecomment-479564036&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Ca80d5307ac3247ca57c008d6b851cb39%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636899058774090752&sdata=n207mpgJA2AaOapiv%2FYn9yRGVAePpe%2BruLb0QlQREL8%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKpT3Gbjkbe0sB2OAX5JoLrw4244t3LWks5vdNdTgaJpZM4afltO&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Ca80d5307ac3247ca57c008d6b851cb39%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636899058774090752&sdata=QJtXRNBSplXCOXO8sNmFgYvmqi0WSJnU1Iq0ZlbvYCU%3D&reserved=0.

[cid:3ACE4B68-E6D1-4419-88B9-206C92AEDA6A]

stackTom commented 5 years ago

There was a typo in the query. Now it appears correct and says that the min velocity is 40.8582694113972 cm/year and the max is 115.910701313171. So according to the logic in the first post: 115 * 50% ~ 60, which is what it chooses. Please check and tell me if there is any other bug:

http://ec2-18-191-170-57.us-east-2.compute.amazonaws.com/start/-0.008/-78.0/7?startDataset=S1_IW1_128_0593_0597_20180713_XXXXXXXX

falkamelung commented 5 years ago

It works well now. Great! Thank you! Falk

Falk Amelung Professor Department of Marine Geosciences Rosenstiel School of Marine and Atmospheric Sciences University of Miami 4600 Rickenbacker Causeway Miami, FL 33149 USA Tel: 305 421 4949 E-mail: famelung@rsmas.miami.edumailto:famelung@rsmas.miami.edu Web: http://insar.rsmas.miami.edu InSAR data: http://insarmaps.miami.edu

On Apr 4, 2019, at 9:29 AM, stackTom notifications@github.com<mailto:notifications@github.com> wrote:

There was a typo in the query. Now it appears correct and says that the min velocity is 40.8582694113972 cm/year and the max is 115.910701313171. So according to the logic in the first post: 115 * 50% ~ 60, which is what it chooses. Please check and tell me if there is any other bug:

http://ec2-18-191-170-57.us-east-2.compute.amazonaws.com/start/-0.008/-78.0/7?startDataset=S1_IW1_128_0593_0597_20180713_XXXXXXXXhttps://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fec2-18-191-170-57.us-east-2.compute.amazonaws.com%2Fstart%2F-0.008%2F-78.0%2F7%3FstartDataset%3DS1_IW1_128_0593_0597_20180713_XXXXXXXX&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7C406ec7c05a864a105e0608d6b9124fe5%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636899885637020019&sdata=ErEwRrbio94yvg44fw8neeaZ1RQyLEOXkXMpHY2flZs%3D&reserved=0

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeodesymiami%2Finsarmaps%2Fissues%2F3%23issuecomment-479945892&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7C406ec7c05a864a105e0608d6b9124fe5%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636899885637030024&sdata=HbKO5goHqrNlC8oD5fOLVEqhUHa9v13DPGu%2BEPE5aqc%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKpT3FdeVW-FPpPVB35TLJ_O6yfoRTgFks5vdhpQgaJpZM4afltO&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7C406ec7c05a864a105e0608d6b9124fe5%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636899885637030024&sdata=QROGWH3%2B1ArAwQTIp4dUR6pAVesTBgHUMGslwpNHosM%3D&reserved=0.