separator.kv 4.48 KB
Newer Older
Jakob Knollmueller's avatar
Jakob Knollmueller committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#:kivy 1.0.9
TextInput:
    on_parent:self.focus = True

<MyWidget>:
    image_widget: image_widget
    menu_widget: menu_widget
    data_path: 'hst_05195_01_wfpc2_f702w_pc_sci.fits'
    result_path: ''
    alpha: 1.5
    spacing: 10
    orientation: 'horizontal'

    MenuWidget:
        id: menu_widget
        size_hint: 0.5,1


    ImageWidget:
        id: image_widget
        size_hint: 1,1


<MyAlphaWidget>:
    orientation: 'horizontal'
    Label:
        text: unichr(945)
    FloatInput
        text: '1.5'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
30
31
32
33
34
35
36
37
        on_text: app.set_alpha(self.text)
<IterationWidget>:
    orientation: 'horizontal'
    Label:
        text: 'iterations'
    IntInput
        text: '3'
        on_text: app.set_iterations(self.text)
Jakob Knollmueller's avatar
Jakob Knollmueller committed
38
39
40

<FloatInput>:
    multiline: False
Jakob Knollmueller's avatar
Jakob Knollmueller committed
41
42
<IntInput>:
    multiline: False
Jakob Knollmueller's avatar
Jakob Knollmueller committed
43

Jakob Knollmueller's avatar
Jakob Knollmueller committed
44
45
<MyImage>:
    text: self.text
46
47
    source: self.source
    img: img
Jakob Knollmueller's avatar
Jakob Knollmueller committed
48
49
50
51
52
53
    orientation: 'vertical'
    spacing: 10

    Label:
        text: self.parent.text
        size_hint: 1,0.1
54
55
56
    Image:
        id: img
        source: self.parent.source
Jakob Knollmueller's avatar
Jakob Knollmueller committed
57
58
59
60
61
<AllImageWidget>:
    data: data
    points: points
    diffuse: diffuse
    power:power
Jakob Knollmueller's avatar
Jakob Knollmueller committed
62
63
64
65
66
67
68
69
    orientation: 'vertical'
    spacing: 10
    BoxLayout
        spacing: 10
        orientation: 'horizontal'
        MyImage:
            id: data
            text: 'data'
70
            source: app.data_image
Jakob Knollmueller's avatar
Jakob Knollmueller committed
71
72
        MyImage:
            id: diffuse
73
            source: app.diffuse_image
Jakob Knollmueller's avatar
Jakob Knollmueller committed
74
75
76
77
78
            text: 'diffuse'
    BoxLayout:
        spacing: 10
        orientation: 'horizontal'
        MyImage:
Jakob Knollmueller's avatar
Jakob Knollmueller committed
79
            id:points
80
            source: app.points_image
Jakob Knollmueller's avatar
Jakob Knollmueller committed
81
82
83
            text: 'points'
        MyImage:
            id: power
84
            source: app.power_image
Jakob Knollmueller's avatar
Jakob Knollmueller committed
85
            text: 'power'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
86
<DisplayWidget>
Jakob Knollmueller's avatar
Jakob Knollmueller committed
87
88
89
    all: all
    points: points
    diffuse: diffuse
90
91
    data: data
    power: power
Jakob Knollmueller's avatar
Jakob Knollmueller committed
92
93
94
    AllImageScreen:
        id:all
        name: 'all'
95
96
        on_pre_enter: self.reload()

Jakob Knollmueller's avatar
Jakob Knollmueller committed
97
98
99
100
    SingleImageScreen:
        id:data
        name: 'data'
        text: 'data'
101
102
103
        source: app.data_image
        on_pre_enter: self.reload()

Jakob Knollmueller's avatar
Jakob Knollmueller committed
104
105
106
107
    SingleImageScreen:
        id: diffuse
        name: 'diffuse'
        text: 'diffuse'
108
109
110
        source: app.diffuse_image
        on_pre_enter: self.reload()

Jakob Knollmueller's avatar
Jakob Knollmueller committed
111
112
113
114
    SingleImageScreen:
        id: points
        name: 'points'
        text: 'points'
115
116
117
        source: app.points_image
        on_pre_enter: self.reload()

Jakob Knollmueller's avatar
Jakob Knollmueller committed
118
119
120
121
    SingleImageScreen:
        id:power
        name: 'power'
        text: 'power'
122
123
124
        source: app.power_image
        on_pre_enter: self.reload()

Jakob Knollmueller's avatar
Jakob Knollmueller committed
125
126
127
128

<SingleImageScreen>
    img: img
    name: ''
129
    source: self.source
Jakob Knollmueller's avatar
Jakob Knollmueller committed
130
131
132
133
    text: ''
    MyImage
        id: img
        text: self.parent.text
134
        source: self.parent.source
Jakob Knollmueller's avatar
Jakob Knollmueller committed
135
136
137
138
139
140

<AllImageScreen>
    name: ''
    all : all
    AllImageWidget
        id:all
Jakob Knollmueller's avatar
Jakob Knollmueller committed
141
142
143
144
145

<MenuWidget>:
    orientation: 'vertical'
    MyAlphaWidget:
        size_hint: 1,0.1
Jakob Knollmueller's avatar
Jakob Knollmueller committed
146
147
    IterationWidget:
        size_hint: 1,0.1
Jakob Knollmueller's avatar
Jakob Knollmueller committed
148

Jakob Knollmueller's avatar
Jakob Knollmueller committed
149

Jakob Knollmueller's avatar
Jakob Knollmueller committed
150
    ActionWidget
Jakob Knollmueller's avatar
Jakob Knollmueller committed
151

Jakob Knollmueller's avatar
Jakob Knollmueller committed
152
153
154
155
<ActionWidget>:
    orientation: 'horizontal'
    Button:
        text: 'load data'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
156
        on_press:  app.root.current = 'file'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
157
158
159
160
161
    Button:
        text: 'run separation'
        on_press: app.run_separation()
    Button:
        text: 'save results'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
162
        on_press:  app.save_results()
Jakob Knollmueller's avatar
Jakob Knollmueller committed
163

Jakob Knollmueller's avatar
Jakob Knollmueller committed
164
165
166
167
<DisplayChoiceWidget>:
    orientation: 'horizontal'
    Button:
        text: 'all'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
168
        on_press: app.image_widget.current = 'all'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
169
170
    Button:
        text: 'data'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
171
        on_press: app.image_widget.current = 'data'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
172
173
    Button:
        text: 'diffuse'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
174
        on_press: app.image_widget.current = 'diffuse'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
175
176
    Button:
        text: 'points'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
177
        on_press: app.image_widget.current = 'points'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
178
179
    Button:
        text: 'power'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
180
181
        on_press: app.image_widget.current = 'power'
<ImageWidget>:
Jakob Knollmueller's avatar
Jakob Knollmueller committed
182
    orientation: 'vertical'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
    image_widget : image_widget

    DisplayChoiceWidget:
        size_hint: 1, 0.1
    DisplayWidget:
        id: image_widget


<MyPathBrowser>:
    id: _filebrowser
    dirselect: True

<MyFileBrowser>:

<GlobalScreenManager>:
    file: file
    main: main
    path: path

    MainScreen:
        id: main
        name: 'main'

Jakob Knollmueller's avatar
Jakob Knollmueller committed
206
207
208
209
    FileScreen:
        id:file
        name: 'file'

Jakob Knollmueller's avatar
Jakob Knollmueller committed
210
211
212
213
    PathScreen:
        id: path
        name: 'path'

Jakob Knollmueller's avatar
Jakob Knollmueller committed
214

Jakob Knollmueller's avatar
Jakob Knollmueller committed
215
216
217
<FileScreen>:
    MyFileBrowser:
        on_success: app.load_data(self.selection)
Jakob Knollmueller's avatar
Jakob Knollmueller committed
218
219
        on_canceled: app.root.current = 'main'

Jakob Knollmueller's avatar
Jakob Knollmueller committed
220
221
222
223
224
225
<MainScreen>:
    image_widget: image_widget
    MyWidget:
        id:image_widget
<PathScreen>:
    MyPathBrowser
Jakob Knollmueller's avatar
Jakob Knollmueller committed
226
227
228
        filters: [root.is_dir]
        on_success: app.select_path(self.selection)
        on_canceled: app.root.current = 'main'
Jakob Knollmueller's avatar
Jakob Knollmueller committed
229
230
231
232




Jakob Knollmueller's avatar
Jakob Knollmueller committed
233
234
235
236
237
238
239
240