Skip to content

Commit 34cd7ec

Browse files
committed
established baseline plot with SBAS and PS option
1 parent 0cd08ef commit 34cd7ec

5 files changed

Lines changed: 11008 additions & 6 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
Product,PerpBaseline[m],TempBaseline[days],Coherence,HeightofAmbiguity[m],DopplerDiff[Hz],
2+
S1A_IW_SLC__1SDV_20180302T120341_20180302T120409_020836_023BAE_BB89,0.00,0.00,1.00,0,0.00
3+
S1A_IW_SLC__1SDV_20170810T120342_20170810T120410_017861_01DF21_CAFE,5.75,204.00,0.81,-3120.40,1.80
4+
S1A_IW_SLC__1SDV_20170717T120341_20170717T120409_017511_01D472_0CFE,-17.88,228.00,0.78,1002.71,2.58
5+
S1A_IW_SLC__1SDV_20170729T120342_20170729T120410_017686_01D9CD_7EC4,-36.67,216.00,0.77,488.93,-6.24
6+
S1A_IW_SLC__1SDV_20170705T120340_20170705T120408_017336_01CF21_11B4,65.73,240.00,0.74,-272.80,1.85
7+
S1A_IW_SLC__1SDV_20170623T120340_20170623T120407_017161_01C9D6_9D36,-10.59,252.00,0.76,1693.18,4.94
8+
S1A_IW_SLC__1SDV_20170611T120339_20170611T120407_016986_01C47D_13AC,-9.10,264.00,0.75,1969.65,0.57
9+
S1A_IW_SLC__1SDV_20170530T120338_20170530T120406_016811_01BF0F_7A98,59.24,276.00,0.71,-302.64,-3.20
10+
S1B_IW_SLC__1SDV_20170605T120307_20170605T120335_005915_00A5F6_AE9B,-21.62,270.00,0.74,829.43,0.01
11+
S1A_IW_SLC__1SDV_20170518T120337_20170518T120405_016636_01B9AB_605B,-69.75,288.00,0.69,257.04,-0.05
12+
S1A_IW_SLC__1SDV_20170424T120336_20170424T120404_016286_01AF0F_95D3,-9.43,312.00,0.71,1901.38,1.85
13+
S1A_IW_SLC__1SDV_20170319T120335_20170319T120403_015761_019F2B_175D,-14.37,348.00,0.67,1247.79,-1.76
14+
S1A_IW_SLC__1SDV_20170506T120337_20170506T120405_016461_01B453_54F2,-107.80,300.00,0.66,166.32,-2.57
15+
S1A_IW_SLC__1SDV_20170331T120335_20170331T120403_015936_01A461_0390,-2.43,336.00,0.69,7369.81,0.09
16+
S1A_IW_SLC__1SSV_20170118T120349_20170118T120419_014886_018479_70E5,37.68,408.00,0.61,-475.84,-4.42
17+
S1A_IW_SLC__1SSV_20170211T120348_20170211T120418_015236_018F45_FAB3,11.34,384.00,0.64,-1581.63,-0.24
18+
S1A_IW_SLC__1SDV_20170223T120348_20170223T120418_015411_0194AE_310E,29.38,372.00,0.64,-610.21,1.20
19+
S1A_IW_SLC__1SDV_20170307T120348_20170307T120418_015586_0199F9_8DB1,54.78,360.00,0.64,-327.31,-2.22
20+
S1A_IW_SLC__1SSV_20161201T120352_20161201T120421_014186_016EB0_4653,31.55,456.00,0.57,-568.24,0.66
21+
S1A_IW_SLC__1SSV_20161107T120352_20161107T120422_013836_0163E0_038D,-50.40,480.00,0.54,355.74,-5.97
22+
S1A_IW_SLC__1SSV_20161014T120352_20161014T120422_013486_0158F9_2CE3,26.32,504.00,0.53,-681.30,-4.87
23+
S1A_IW_SLC__1SSV_20161225T120351_20161225T120421_014536_0179B2_BFE1,26.36,432.00,0.59,-680.30,-1.58
24+
S1A_IW_SLC__1SSV_20160920T120352_20160920T120422_013136_014DD6_5D4F,-27.40,528.00,0.50,654.28,3.23
25+
S1A_IW_SLC__1SSV_20160803T120350_20160803T120420_012436_0136AE_EE55,-32.49,576.00,0.46,551.91,-2.94
26+
S1A_IW_SLC__1SSV_20160827T120351_20160827T120421_012786_014257_D405,-38.10,552.00,0.48,470.65,-3.46
27+
S1A_IW_SLC__1SDV_20170412T120336_20170412T120403_016111_01A9AE_25D1,-40.21,324.00,0.68,445.87,-2.15
28+
S1A_IW_SLC__1SDV_20170822T120343_20170822T120411_018036_01E472_2766,33.15,192.00,0.80,-540.92,3.42
29+
S1A_IW_SLC__1SDV_20180805T120348_20180805T120416_023111_028289_9CEE,-7.36,-156.00,0.85,2434.83,-2.89
30+
S1A_IW_SLC__1SDV_20180724T120348_20180724T120416_022936_027D11_84B7,-1.24,-144.00,0.87,14490.64,-0.55
31+
S1A_IW_SLC__1SDV_20180630T120346_20180630T120414_022586_02725D_994D,50.50,-120.00,0.85,-355.05,-3.41
32+
S1A_IW_SLC__1SDV_20180712T120347_20180712T120415_022761_02778E_16A6,53.51,-132.00,0.84,-335.08,-5.47
33+
S1A_IW_SLC__1SDV_20180618T120346_20180618T120413_022411_026D46_B7E0,21.73,-108.00,0.88,-825.01,-0.42
34+
S1A_IW_SLC__1SDV_20180606T120345_20180606T120413_022236_0267DF_208D,17.20,-96.00,0.90,-1042.13,-1.49
35+
S1A_IW_SLC__1SDV_20180513T120343_20180513T120411_021886_025CD7_4649,-51.34,-72.00,0.89,349.21,-0.23
36+
S1A_IW_SLC__1SDV_20180525T120344_20180525T120412_022061_02625F_A62B,-66.20,-84.00,0.87,270.82,-1.31
37+
S1A_IW_SLC__1SDV_20180501T120343_20180501T120411_021711_02573C_87A4,45.74,-60.00,0.91,-391.98,-1.00
38+
S1A_IW_SLC__1SDV_20180419T120342_20180419T120410_021536_0251BB_6926,46.80,-48.00,0.92,-383.15,-0.55
39+
S1A_IW_SLC__1SDV_20180326T120341_20180326T120409_021186_0246CB_4C3A,39.29,-24.00,0.95,-456.29,-1.30
40+
S1A_IW_SLC__1SDV_20180314T120341_20180314T120409_021011_02413B_7CCF,34.10,-12.00,0.96,-525.80,-0.33
41+
S1A_IW_SLC__1SDV_20180407T120342_20180407T120410_021361_024C46_0759,31.00,-36.00,0.94,-578.40,-0.55
42+
S1A_IW_SLC__1SDV_20180218T120341_20180218T120409_020661_023622_4549,-14.31,12.00,0.97,1252.71,-3.48
43+
S1A_IW_SLC__1SDV_20180206T120341_20180206T120409_020486_02308C_D981,-31.23,24.00,0.95,574.21,1.34
44+
S1A_IW_SLC__1SDV_20180113T120342_20180113T120410_020136_022569_57E2,45.85,48.00,0.92,-391.03,0.99
45+
S1A_IW_SLC__1SDV_20180125T120342_20180125T120409_020311_022AF6_12FC,22.68,36.00,0.95,-790.66,1.87
46+
S1A_IW_SLC__1SDV_20180101T120342_20180101T120410_019961_021FE1_5900,125.26,60.00,0.84,-143.14,3.52
47+
S1A_IW_SLC__1SDV_20171220T120343_20171220T120411_019786_021A70_FB0C,54.29,72.00,0.89,-330.28,0.04
48+
S1A_IW_SLC__1SDV_20171126T120344_20171126T120412_019436_020F89_E627,-48.09,96.00,0.87,372.81,-6.46
49+
S1A_IW_SLC__1SDV_20171208T120343_20171208T120411_019611_0214FC_1FDD,57.12,84.00,0.88,-313.88,-3.00
50+
S1A_IW_SLC__1SDV_20171114T120344_20171114T120412_019261_0209FF_410D,52.94,108.00,0.86,-338.67,-0.71
51+
S1A_IW_SLC__1SDV_20171021T120344_20171021T120412_018911_01FF3B_9AB3,22.21,132.00,0.86,-807.36,2.04
52+
S1A_IW_SLC__1SDV_20171102T120344_20171102T120412_019086_02048A_05BA,26.21,120.00,0.87,-684.01,-3.78
53+
S1A_IW_SLC__1SDV_20171009T120344_20171009T120412_018736_01F9D6_214D,-33.08,144.00,0.84,542.00,1.58
54+
S1A_IW_SLC__1SDV_20180829T120350_20180829T120418_023461_028DC3_4EA3,-29.38,-180.00,0.81,610.26,-2.64
55+
S1A_IW_SLC__1SDV_20170927T120344_20170927T120412_018561_01F486_DA05,-61.08,156.00,0.81,293.54,-4.57
56+
S1A_IW_SLC__1SDV_20170915T120344_20170915T120412_018386_01EF2B_1E9F,-64.79,168.00,0.80,276.75,1.96
57+
S1A_IW_SLC__1SDV_20170903T120343_20170903T120411_018211_01E9B7_CE1F,5.25,180.00,0.83,-3412.65,-1.99
58+
S1A_IW_SLC__1SDV_20180817T120349_20180817T120417_023286_028835_8388,-40.46,-168.00,0.82,443.17,-1.78
59+
S1A_IW_SLC__1SDV_20190707T120353_20190707T120420_028011_0329CD_7B90,21.43,-492.00,0.54,-836.77,0.97
60+
S1A_IW_SLC__1SDV_20190625T120352_20190625T120420_027836_03247A_47A3,-9.21,-480.00,0.56,1947.19,0.92
61+
S1A_IW_SLC__1SDV_20190613T120351_20190613T120419_027661_031F43_4B51,71.63,-468.00,0.54,-250.32,2.25
62+
S1A_IW_SLC__1SDV_20190601T120350_20190601T120418_027486_0319F2_F8A7,-29.76,-456.00,0.57,602.52,-2.78
63+
S1A_IW_SLC__1SDV_20190414T120348_20190414T120416_026786_030276_66FC,-21.34,-408.00,0.62,840.06,-2.71
64+
S1A_IW_SLC__1SDV_20190508T120349_20190508T120417_027136_030F08_F173,74.72,-432.00,0.57,-239.94,-1.00
65+
S1A_IW_SLC__1SDV_20190402T120348_20190402T120416_026611_02FC10_291C,-36.45,-396.00,0.62,491.97,0.67
66+
S1A_IW_SLC__1SDV_20190520T120350_20190520T120418_027311_031480_1D13,7.40,-444.00,0.59,-2423.06,0.37
67+
S1A_IW_SLC__1SDV_20190321T120348_20190321T120416_026436_02F598_FAE9,-16.18,-384.00,0.64,1108.20,-3.31
68+
S1A_IW_SLC__1SDV_20190213T120348_20190213T120416_025911_02E292_5396,27.44,-348.00,0.67,-653.46,-2.99
69+
S1A_IW_SLC__1SDV_20190225T120348_20190225T120416_026086_02E8D9_4A40,-46.04,-360.00,0.64,389.48,-1.51
70+
S1A_IW_SLC__1SDV_20190309T120348_20190309T120415_026261_02EF29_7445,-52.38,-372.00,0.63,342.33,-2.76
71+
S1A_IW_SLC__1SDV_20190201T120348_20190201T120416_025736_02DC62_328B,17.76,-336.00,0.68,-1009.40,1.74
72+
S1A_IW_SLC__1SDV_20181227T120349_20181227T120417_025211_02C956_D24E,-47.55,-300.00,0.70,377.05,-2.64
73+
S1A_IW_SLC__1SDV_20190120T120348_20190120T120416_025561_02D602_E8B5,18.22,-324.00,0.69,-984.00,-1.31
74+
S1A_IW_SLC__1SDV_20190108T120349_20190108T120417_025386_02CFA8_7F36,47.58,-312.00,0.69,-376.80,-0.31
75+
S1A_IW_SLC__1SDV_20181203T120350_20181203T120418_024861_02BCD8_90C1,35.46,-276.00,0.73,-505.57,0.90
76+
S1A_IW_SLC__1SDV_20181121T120351_20181121T120418_024686_02B6BF_409F,64.02,-264.00,0.72,-280.07,-2.66
77+
S1A_IW_SLC__1SDV_20181215T120350_20181215T120417_025036_02C2FF_4D0C,59.68,-288.00,0.70,-300.45,-0.26
78+
S1A_IW_SLC__1SDV_20181109T120351_20181109T120419_024511_02B04D_2CBE,58.28,-252.00,0.73,-307.64,-3.29
79+
S1A_IW_SLC__1SDV_20181028T120351_20181028T120419_024336_02AA1D_589A,-13.83,-240.00,0.77,1296.06,1.02
80+
S1A_IW_SLC__1SDV_20181016T120351_20181016T120419_024161_02A47A_CC4C,-90.50,-228.00,0.73,198.12,-5.42
81+
S1A_IW_SLC__1SDV_20180922T120351_20180922T120418_023811_02990F_EAB0,12.12,-204.00,0.80,-1479.02,2.09
82+
S1A_IW_SLC__1SDV_20181004T120351_20181004T120419_023986_029EC8_FBF8,28.23,-216.00,0.78,-635.10,-0.03
83+
S1A_IW_SLC__1SDV_20180910T120350_20180910T120418_023636_02935F_E57E,30.84,-192.00,0.80,-581.41,1.32
84+
S1A_IW_SLC__1SDV_20190812T120355_20190812T120423_028536_033A08_B4EC,-77.52,-528.00,0.48,231.29,-0.30
85+
S1A_IW_SLC__1SDV_20190905T120356_20190905T120424_028886_03462C_DB48,-69.26,-552.00,0.47,258.89,-1.66
86+
S1A_IW_SLC__1SDV_20190824T120356_20190824T120424_028711_034010_9BCC,-96.17,-540.00,0.46,186.43,-5.00
87+
S1A_IW_SLC__1SDV_20190731T120354_20190731T120422_028361_03346D_18CD,53.49,-516.00,0.50,-335.23,-2.32
88+
S1A_IW_SLC__1SDV_20190719T120353_20190719T120421_028186_032F14_1845,-10.79,-504.00,0.53,1661.48,1.74

global.R

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,19 @@ event <- c("---", event)
6363
#tidy up
6464
rm(dat)
6565

66-
library(leaflet)
67-
#load event marker icon
68-
event.icon <- makeIcon("./icons/event_marker_pin.png",
69-
iconWidth = 15,
70-
iconHeight = 25)
66+
##########################
67+
68+
#################
69+
##Baseline Plot##
70+
#################
71+
72+
##in Linux use this to prepare the SNAP export
73+
#sed 's/?/0/g' stack_all_baselines.csv | sed 's/ //g'
74+
75+
#looking for baseline info csv files
76+
dat.path <- list.files("baseline_info/", pattern = ".csv")
77+
78+
str.rev <- function(x){sapply(lapply(strsplit(x, NULL), rev), paste, collapse = "")}
79+
bl.info <- str.rev(dat.path)
80+
bl.info <- substr(bl.info, 5, 100)
81+
bl.info <- str.rev(bl.info)

server.R

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,102 @@ observeEvent(input$sub.offset, {
345345
box(which = "plot")
346346
})}
347347
})
348+
#######################Baseline Plot#####################
348349

350+
observe({
351+
#date input
352+
in.bl.info <- input$bl.file
353+
in.bl.temp <- input$bl.temp
354+
in.bl.spat <- input$bl.spat
355+
356+
dat <- read.csv(paste("baseline_info/", in.bl.info, ".csv", sep = ""))
357+
#dat <- read.csv(paste("baseline_info/", "baseline_test", ".csv", sep = ""))
358+
359+
if(input$blopt == "ps.a"){
360+
pstab.i <- abs(dat$PerpBaseline.m.) <= in.bl.spat & abs(dat$TempBaseline.days.) <= in.bl.temp
361+
#pstab.i <- dat$PerpBaseline.m. <= 200 & dat$TempBaseline.days. <= 48
362+
pstab <- dat[pstab.i, ]
363+
##info text
364+
supprime <- substr(dat$Product[1], 18, 25)
365+
out.bl.text <- paste("The ", nrow(dat), " images were combined to ", nrow(pstab)-1,
366+
" interferograms, using ", in.bl.spat, " m ",
367+
"and ",
368+
in.bl.temp, " days as thresholds.",
369+
" The prime image is from ",
370+
supprime, ".", sep = "")
371+
372+
output$bl.plot <- renderPlot({
373+
##plot PS combinations
374+
plot(dat$PerpBaseline.m. ~ dat$TempBaseline.days.,
375+
xlab = "temporal baseline [days]",
376+
ylab = "perpendicular baseline [m]",
377+
type = "n")
378+
379+
for(i in 2:nrow(pstab)){
380+
x.cord <- c(pstab$TempBaseline.days.[c(1, i)])
381+
y.cord <- c(pstab$PerpBaseline.m.[c(1, i)])
382+
lines(y.cord ~ x.cord, col = "grey80")
383+
}
384+
385+
points(dat$PerpBaseline.m. ~ dat$TempBaseline.days.,
386+
pch = 19, col = "orangered")
387+
points(dat$PerpBaseline.m.[1] ~ dat$TempBaseline.days.[1],
388+
pch = 19, col = "royalblue1")
389+
})
390+
#render output text
391+
output$bl.text <- renderText({out.bl.text})
392+
}else{
393+
#####SBAS Plot######
394+
tbase <-
395+
dat$TempBaseline.days. %>%
396+
dist %>%
397+
as.matrix
398+
tbase <- tbase <= in.bl.temp
399+
#tbase <- tbase <= 48
400+
tbase <- lower.tri(tbase)*tbase
401+
402+
##perp baseline
403+
pbase <-
404+
dat$PerpBaseline.m. %>%
405+
dist %>%
406+
as.matrix
407+
pbase <- pbase <= in.bl.spat
408+
#pbase <- pbase <= 200
409+
pbase <- lower.tri(pbase)*pbase
410+
sbas.base <- pbase*tbase
411+
412+
sbas.base <- which(sbas.base == 1, arr.ind = T)
413+
414+
##info text
415+
supprime <- substr(dat$Product[1], 18, 25)
416+
out.bl.text <- paste("The ", nrow(dat), " images were combined to ", nrow(sbas.base),
417+
" interferograms, using ", in.bl.spat, " m ",
418+
"and ",
419+
in.bl.temp, " days as thresholds.",
420+
" The prime image is from ",
421+
supprime, ".", sep = "")
422+
423+
output$bl.plot <- renderPlot({
424+
##plot sbas combinations
425+
plot(dat$PerpBaseline.m. ~ dat$TempBaseline.days.,
426+
xlab = "temporal baseline [days]",
427+
ylab = "perpendicular baseline [m]",
428+
type = "n")
429+
430+
for(i in 1:nrow(sbas.base)){
431+
x.cord <- c(dat$TempBaseline.days.[sbas.base[i,1:2]])
432+
y.cord <- c(dat$PerpBaseline.m.[sbas.base[i,1:2]])
433+
lines(y.cord ~ x.cord, col = "grey80")
434+
}
435+
436+
points(dat$PerpBaseline.m. ~ dat$TempBaseline.days.,
437+
pch = 19, col = "orangered")
438+
points(dat$PerpBaseline.m.[1] ~ dat$TempBaseline.days.[1],
439+
pch = 19, col = "royalblue1")
440+
})
441+
#render output text
442+
output$bl.text <- renderText({out.bl.text})
443+
}
444+
})
349445
# end of server function
350446
}

0 commit comments

Comments
 (0)