-
Notifications
You must be signed in to change notification settings - Fork 3
/
target_table_exowatch.tmpl
1224 lines (1031 loc) · 40.9 KB
/
target_table_exowatch.tmpl
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- Library for better tooltips -->
<script type="text/javascript" src="https://unpkg.com/tippy.js@3/dist/tippy.all.min.js"></script>
<!-- Created from https://datatables.net/download/, with options:
Datables
JQuery 3 + DataTables
Buttons
Column Visibility
ColReorder
FixedHeader
Responsive
RowGroup
Select
-->
<!-- Latest versions as of 2022-07-27
except:
use Select 1.3.4 rather than 1.4.0: error about undefined
object when reordering rows
use RowGroup 1.1.4
-->
<!-- 09/03/2022 - revert to old versions for now -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/jq-3.3.1/dt-1.10.18/b-1.5.6/b-colvis-1.5.6/cr-1.5.0/fh-3.1.4/r-2.2.2/rg-1.1.4/sl-1.3.4/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/jq-3.3.1/dt-1.10.18/b-1.5.6/b-colvis-1.5.6/cr-1.5.0/fh-3.1.4/r-2.2.2/rg-1.1.4/sl-1.3.4/datatables.min.js"></script>
<!--
Extra stylesheet below modifies the default dataTables one in a few --
--ways; otherwise loading it would be redundant compared to above --
--lines.
-->
<link rel="stylesheet" type="text/css" href="jquery.dataTables.css">
<!-- Initialize the table - sort by column 5 (start time),
floating headers, no pagination (display all entries on one
page).
-->
<!-- After each re-draw of the table renders, scroll each text box
to the bottom to
show the end of the comment. -->
<script type="text/javascript">
$(document).ready( function () {
table = $('#target_table').DataTable( {
paging: false,
fixedHeader: true,
/* Might be useful later if we tweak selection colors:
see https://datatables.net/forums/discussion/73032
orderClasses: false, */
select: {
style: 'multi',
selector: 'input:checkbox.observation-select',
},
responsive: true,
colReorder: { realtime: false, fixedColumnsLeft: 2},
/* Set the DOM with DIVs to help w/ alignment. */
dom: '<"right"B><"sticky"<"clear"f><"#toolbar">>tip',
buttons: [
{
extend: 'colvis',
text: 'Choose columns to show/hide',
},
{
text: 'Reset column order',
action: function ( e, dt, node, config ) { table.colReorder.reset(); }
},
{
extend: 'colvisGroup',
text: 'Show all columns',
show: ':hidden',
},
{
text: 'Disable tooltips',
action: function ( ) {
for (tip of window.tipCollection.instances) {
if (window.tipsEnabled) {
tip.disable();
} else {
tip.enable();
};
};
window.tipsEnabled = !window.tipsEnabled;
scroll_comments(); /* toggles tooltips on comments */
if (window.tipsEnabled) {
this.text('Disable tooltips');
} else {
this.text('Enable tooltips');
};
}
},
{
text: 'Clear filters',
action: function ( ) {
/* Button to toggle state of filtering of
targets shown.
*/
/* If default filtering is *on* (true), that
means that our action is to _clear_ in order
to change that, so clear_vals is also true:
*/
set_default_filters(clear_vals=window.filteringOn);
/* Toggle the variable, and set button text: */
window.filteringOn = !window.filteringOn;
if (window.filteringOn) {
this.text('Clear filters');
} else {
this.text('Use default filters');
}
/* Make sure new search values take effect,
also chaining 'search' with an empty argument to
clear the text input search box: */
$('#target_table').DataTable().search('').draw();
}
},
],
stateSave: true,
stateDuration: 0,
columnDefs: [
{ "orderSequence": [ "desc", "asc" ],
"targets": [ 6, 7, 12 ] },
{ "orderable": false,
"targets": [ 1 ] },
/* These control the order in which columns get hidden */
/* on narrower screens. Higher-numbered priorities */
/* are hidden first. */
/* Date, Name, V, % obs */
{ responsivePriority: 1, targets: [0,1,2,7] },
/* Start/end, Duration, BJD, Elev., Depth */
{ responsivePriority: 2, targets: [3,4,5,6,12,13] },
/* RA/Dec, Period */
{ responsivePriority: 3, targets: [10,11] },
/* Azimuth, HA */
{ responsivePriority: 10, targets: [8, 9] },
/* Comments */
{ responsivePriority: 7, targets: [14] },
],
order: [[ 5, "asc" ]],
rowGroup: { dataSrc: '0.display',
startRender: function ( rows, group ) {
let node = rows.nodes()[0];
let daylabel= node.cells[0].getAttribute('data-header-label');
return daylabel;
}
},
} );
var scroll_comments = function() {
var x = document.getElementsByClassName("scroll");
var i;
for (i = 0; i < x.length; i++) {
var item = x[i];
/* Scroll to bottom of comment. */
x[i].scrollTop = x[i].scrollHeight;
/* Set tooltip for any cells that are scrolled. */
if ((x[i].scrollHeight > x[i].clientHeight) && window.tipsEnabled) {
item._tippy.enable();
} else {
item._tippy.disable();
};
}
}
var hide_on_narrow = function( elementID ) {
var x = document.getElementById(elementID);
if (x == null) {
console.log("Failed to get element in hide_on_narrow:");
console.log(elementID);
return;
}
if ( $(window).width() < 1410 ) {
$(x).hide();
} else {
$(x).show();
};
};
set_default_filters = function( clear_vals=false ) {
/* Function to set search filters to their default values;
called at start, but also can be invoked via a button. If
'clear' is set to true, existing filters are cleared
instead.
*/
/* First value in each set is default, second is value if
cleared. */
let vmax = ['', ''];
let depth = [5, 0];
let transit_frac = [100, 0];
let i = 0;
if (clear_vals) {
i = 1;
}
var slider = document.getElementById("transitFracSlider");
var output = document.getElementById("transitFrac");
/* Start transit+OOT_fraction at 100 (max is 200) */
slider.value = transit_frac[i];
output.innerHTML = slider.value;
document.getElementById("vmax").value= vmax[i];
document.getElementById("depth_min").value = depth[i];
};
/* Scroll the comment boxes on initial load. */
scroll_comments();
/* And also scroll them whenever table is redrawn. */
$('#target_table').on( 'draw.dt', function() {
scroll_comments();
} );
/* or the window is resized: */
$(window).on('resize', function () {
scroll_comments();
hide_on_narrow('obs-label');
} );
/* Clicking in a comment cell expands or contracts it, by */
/* toggling the class that sets the scroll height of the cell. */
$('#target_table tbody').on( 'click', 'div#comments', function () {
$(this).toggleClass('scroll');
} );
$('#non-transit_table').DataTable( {
"paging": false,
fixedHeader: true
} );
$('#non-transit_table').on( 'draw.dt', function() {scroll_comments();});
var reload_colvis_button = function() {
table.button(0).remove();
table.button().add(0,
{
extend: 'colvis',
autoClose: false,
fade: 0,
columns: ':not(.noColVis)',
colVis: { showAll: "Show all" }
});
}
table.on('column-reorder', function () {
reload_colvis_button();
});
reload_colvis_button();
window.unobservable_showing = true;
// ----- Functions for searching/filtering the table . -------- //
$.fn.dataTable.ext.search.push(
function( settings, searchData, dataIndex ) {
var slider = document.getElementById("transitFracSlider");
var minFrac = parseInt(slider.value);
/* Get the index for *original* col even if reordered: */
var idx=table.colReorder.transpose( 7 );
if ( searchData[idx] >= minFrac )
{
return true;
} else {
return false;
}
});
$.fn.dataTable.ext.search.push(
function( settings, searchData, dataIndex ) {
/* Search function for max V magnitude to show. */
var vmax_string = document.getElementById("vmax");
var vmax = parseFloat(vmax_string.value);
/* Get the index for *original* col even if reordered: */
var idx=table.colReorder.transpose( 2 );
var vobs = parseFloat(searchData[idx])
if ( isNaN(vmax) || isNaN(vobs) || vobs <= vmax )
{
return true;
} else {
return false;
}
});
$.fn.dataTable.ext.search.push(
function( settings, searchData, dataIndex ) {
/* Search function for minimum transit depth to show. */
var depth_min_string = document.getElementById("depth_min");
var depth_min = parseFloat(depth_min_string.value);
/* Get the index for *original* col even if reordered: */
var idx=table.colReorder.transpose( 12 );
var depth_obs = parseFloat(searchData[idx])
if ( isNaN(depth_min) || isNaN(depth_obs) || depth_obs >= depth_min )
{
return true;
} else {
return false;
}
});
// ----- End of functions for searching/filtering the table . -------- //
/* Insert code in custom search toolbar */
$("#toolbar").html(' Show if visible transit % + baseline % > <span id="transitFrac" style="width:25px;max-width:25px;display:inline-block"></span> <input type="range" min="0" max="200" value="0" style="display:inline;vertical-align:middle;line-height:22px;" class="slider" id="transitFracSlider"> V<sub>max</sub>: <input type="number" min="0" step="0.1" style="width: 3.5em" id="vmax"> Depth<sub>min</sub>: <input type="number" min="0" step="0.1" value="5" style="width: 3.5em" id="depth_min"> ppt <span class="with_tooltip" title="" id="overlapSpinner">Overlap: <input type="number" step="1" value="0" style="width: 3.5em" id="overlapTol"> m.</span><span id="obs-label" style="float:right;vertical-align:middle;line-height:22px;display:inline;"><TMPL_VAR NAME="observatory_name"></span>');
$('#vmax').on("change keyup", function() {
table.draw();
deselectHiddenRows();
} );
$('#depth_min').on("change keyup", function() {
table.draw();
deselectHiddenRows();
} );
$('#transitFracSlider').on("change keyup", function() {
table.draw();
deselectHiddenRows();
} );
/* Code for dealing with selected rows */
// When the overlap is changed, check the selected rows to make sure all can
// still be observed. Redrawing the table forces the search criteria to be applied.
$('#overlapTol').on("change keyup", function() {
let valid = validateSelectedSet();
styleOverlappingRows(valid);
if (!valid) {
alert('The events selected are no longer all observable given the reduced overlap tolerance selected.');
}
table.draw();
} );
// Arrays of start and end times of selected rows:
var selectedStart = [];
var selectedEnd = [];
var selectedRows = [];
var populateTimes = function() {
/* Get start and end observation times of selected cells: */
selectedStart = [];
selectedEnd = [];
selectedRows = [];
/* Get the index for *original* col even if reordered: */
var colInd=table.colReorder.transpose( 0 );
for (rowInd of Array.from(table.rows( { selected: true } ).indexes())) {
var node = table.cell(rowInd, colInd).node();
selectedStart.push(parseFloat(node.attributes['data-obs-start'].value));
selectedEnd.push(parseFloat(node.attributes['data-obs-end'].value));
selectedRows.push(rowInd);
};
};
var toggleSelectTooltips = function(box){
tippy(box);
if( box.checked ){
box._tippy.setContent('De-select to show overlapping events')
} else {
box._tippy.setContent('Select to hide overlapping events');
}
};
var overlappingEvents = function(start1, end1, start2, end2, overlapTol) {
/* Determine whether two events overlap by more than the allowed
tolerance. Return true if events are mutually overlapping,
false if not (in which case both can be observed). All times
assumed to be in the same units. If overlapTol is negative,
that enforces extra time between events for them to be
considered not overlapping. */
let overlap = (
// Start1 is within event2 interval
((start1 >= start2) &&
(start1 <= end2 - overlapTol)) ||
// End1 is within event2 interval
((end1 >= start2 + overlapTol) &&
(end1 <= end2)) ||
// Event1 fully spans event2
((start1 <= start2) &&
(end1 >= end2))
);
return overlap;
};
var validateSelectedSet = function() {
/* Take the set of selected events and make sure that they
are mutually observable, given the current settings for
allowed overlap. Return true if valid, false if not. */
var count = selectedStart.length;
if (count == 0) {
// No rows selected, all should be visible.
return true;
};
/* Get the tolerance for overlap */
var tol_string = document.getElementById("overlapTol");
var tolMinutes = parseFloat(tol_string.value);
const tol = tolMinutes/(60*24); // Overlap allowed, in days
// Loop over all pairs of events and check them against each other:
for (let i = 0; i < count; i++) {
start1 = selectedStart[i];
end1 = selectedEnd[i];
for (let j = i+1; j < count; j++) {
start2 = selectedStart[j];
end2 = selectedEnd[j];
if (overlappingEvents(start1, end1, start2, end2, tol)) {
return false;
}
}
}
// If no overlap found above, set is valid:
return true;
}
var overlappingRows = function() {
/* Take the set of selected events and return an
array of row indices of any rows that overlap.
If there is no overlap, return empty array.
*/
var count = selectedStart.length;
var overlapInds = [];
if (count == 0) {
// No rows selected, all should be visible.
return overlapInds;
};
/* Get the tolerance for overlap */
var tol_string = document.getElementById("overlapTol");
var tolMinutes = parseFloat(tol_string.value);
const tol = tolMinutes/(60*24); // Overlap allowed, in days
// Loop over all pairs of events and check them against each other:
for (let i = 0; i < count; i++) {
start1 = selectedStart[i];
end1 = selectedEnd[i];
for (let j = i+1; j < count; j++) {
start2 = selectedStart[j];
end2 = selectedEnd[j];
if (overlappingEvents(start1, end1, start2, end2, tol)) {
overlapInds.push(selectedRows[i],selectedRows[j]);
}
}
}
return overlapInds;
}
var styleOverlappingRows = function(valid) {
/* Apply or remove the class that uses row shading to indicate
whether the currently selected set is valid or not.
The 'valid' parameter is a boolean (generally
returned from validateSelectedSet) that indicates
whether or not there is overlap of selected events.
*/
if (valid) {
$('tr').removeClass('overlapping');
} else {
table.rows(overlappingRows()).nodes().to$().addClass('overlapping');
};
};
table.on('select', function ( event, dt, type, indexes ) {
populateTimes();
$('.observation-select').each(function() {
toggleSelectTooltips(this)
});
styleOverlappingRows(validateSelectedSet());
table.draw();
// After filtering, try to make the just-selected event (which
// had just been under the cursor) still be visible:
table.row(indexes[0]).node().scrollIntoView({block: "center"});
});
table.on('deselect', function ( event, dt, type, indexes ) {
populateTimes();
$('.observation-select').each(function() {
toggleSelectTooltips(this)
});
styleOverlappingRows(validateSelectedSet());
table.draw();
});
// Search function that selects compatible rows:
$.fn.dataTable.ext.search.push(
function( settings, searchData, dataIndex ) {
var count = selectedStart.length;
if (count == 0) {
// No rows selected, all should be visible.
return true;
};
// Keep selected rows visible:
if (table.row(dataIndex, { selected: true }).any()) {
return true;
};
/* Get the tolerance for overlap */
var tol_string = document.getElementById("overlapTol");
var tolMinutes = parseFloat(tol_string.value);
const tol = tolMinutes/(60*24); // Overlap allowed, in days
/* Get the index for *original* col even if reordered: */
var colInd=table.colReorder.transpose( 0 );
var node = table.cell(dataIndex, colInd).node();
var eventStart = parseFloat(node.attributes['data-obs-start'].value);
var eventEnd = parseFloat(node.attributes['data-obs-end'].value);
for (let i = 0; i < count; i++) {
if (overlappingEvents(eventStart, eventEnd,
selectedStart[i], selectedEnd[i], tol)) {
return false;
}
}
return true;
});
// On initial load, clear any selected checkboxes for row selection
// and set up the tooltips:
$('.observation-select').each(function() {
this.checked = false;
toggleSelectTooltips(this);
});
/* When other search methods hide rows, make sure that filtered
rows get deselected. Notify the user if this happens.
This function does not explicitly re-draw the table (though the
deselect event might).
*/
var deselectHiddenRows = function() {
selectedHidden = table.rows( { selected: true, search: 'removed' });
if (selectedHidden.count() > 0) {
alert('Some of your previously selected events have been hidden'+
' by your other filtering choices.\n\nThey will now be de-selected.');
// Make sure checkbox gets unchecked:
selectedHidden.nodes().to$().find('input.observation-select').each(
function(){this.checked=false});
// In case any had been overlapping:
selectedHidden.nodes().to$().removeClass('overlapping');
// Then actually de-select rows:
selectedHidden.deselect();
}
};
/* End of code related to row selection */
/* Offset floating table headers so toolbar shows: */
table.fixedHeader.headerOffset( $('#toolbar').outerHeight()+ 6.5 );
/* Hide observatory name on narrow screens: */
hide_on_narrow('obs-label');
} ); // End of document.ready block
</script>
<style>
/* Width of search box above table: */
.dataTables_filter input { width: 100px }
/* Style for selected rows when other parameter changes have
made the current selections overlap. */
tr.overlapping, table.dataTable.display tbody tr.overlapping > .sorting_1 {
background-color: #FF8080 !important;
}
div.scroll {
max-height: 150px;
overflow-y: auto;
}
div.clear {
clear: both;
}
div.right {
float: right;
}
div.sticky {
position: sticky;
position: -webkit-sticky; /* Safari */
top: 0;
background-color: white;
border: 3.5px solid white;
width: 100%;
height: 50;
overflow: hidden;
z-index: 10;
}
.button {
font: bold 13px Times;
text-decoration: none;
background-color: #EEEEEE;
color: #333333;
padding: 2px 6px 0px 6px;
border-top: 1px solid #CCCCCC;
border-right: 1px solid #333333;
border-bottom: 1px solid #333333;
border-left: 1px solid #CCCCCC;
}
/* Styling to make the selected buttons for column visibility appear a different
color than the unselected/hidden column buttons. */
button.dt-button:active:not(.disabled),
button.dt-button.active:not(.disabled),
div.dt-button:active:not(.disabled),
div.dt-button.active:not(.disabled),
a.dt-button:active:not(.disabled),
a.dt-button.active:not(.disabled){
color:#338833;
}
svg {
fill: none;
stroke: #000;
stroke-width: 1.5px;
vector-effect: non-scaling-stroke;
display: block;
margin-bottom: 1px;
}
path {
vector-effect: inherit;
}
.active {
stroke: #22E;
stroke-width: 3px;
}
.grey {
stroke: #555;
stroke-width: 2px;
stroke-dasharray: 4,2;
}
/* Manual scaling since Edge doesn't support non-scaling-stroke: */
@supports (-ms-ime-align:auto) {
.active {
stroke-width: 33px;
}
.grey {
stroke-width: 22px;
stroke-dasharray: 44,22;
}
}
</style>
<h3>Results shown for <TMPL_VAR NAME="observatory_name">
latitude = <TMPL_VAR NAME="observatory_latitude">,
longitude = <TMPL_VAR NAME="observatory_longitude">.
</h3>
<p>
Colored text indicates <span style="color:MediumVioletRed">
a part of the transit that is during daylight</span>, or a transit
<span style="color:Red">at elevation less than the user-specified limits</span>, or that
<span style="color:#E5542C" class="with_tooltip"
data-tippy-content="Text is highlighted if 2000/(Moon distance) + Moon illum pct. > 100">the Moon is relatively full and close to
the target</span>.
</p>
<p> Click on column headers to sort the table by that column. Click
again to reverse the sorting order. To sub-sort, first click one column
(e.g. the left-hand one to sort by night), then <em>shift-click</em>
another column to sort further within the first category.
For example, to sort by priority within a given night (when multiple
nights are displayed), first click the "Local evening date" header,
then shift-click the "Priority" header. The highlighted column shows the current sorting.
</p>
<p> The buttons can be used to toggle the visibility of columns, and the
column order can be rearranged by clicking and dragging the column
header.
</p>
<p>
</p>
<TMPL_IF NAME="eclipse_info">
<table border="1" cellpadding="5" style="width:100%" id="target_table" class="display responsive">
<thead>
<tr>
<th> Local evening date </th>
<th> Name </th>
<th> <TMPL_IF NAME="tess">TESS mag<TMPL_ELSE>V or Gaia mag</TMPL_IF></th>
<th style="white-space: nowrap"> Start—<br/>Mid<br/> —End </th>
<th> Duration </th>
<th> BJD<sub>TDB</sub> start-mid-end </th>
<th> Elev. at start, mid, end
<TMPL_IF EXPR="baseline_hrs > 0">±<TMPL_VAR NAME="baseline_hrs"> hrs</TMPL_IF></th>
<th> % of transit (baseline) observable,<br/> Suggested
obs. start, end </th>
<th> Az. at start, mid, end <TMPL_IF EXPR="baseline_hrs > 0">±<TMPL_VAR NAME="baseline_hrs"> hrs</TMPL_IF></th>
<th> HA at start, mid, end <TMPL_IF EXPR="baseline_hrs > 0">±<TMPL_VAR NAME="baseline_hrs"> hrs</TMPL_IF></th>
<th> RA & Dec (J2000) </th>
<th> Period (days) </th>
<th> Depth (ppt) </th>
<TMPL_IF NAME="tess">
<th class="with_tooltip" data-tippy-content="<div style='text-align:left;'>
CP = Confirmed Planet <br />
FP = False Positive <br />
KP = Known Planet <br />
PC = Planet Candidate <br />
</div>"> TFOPWG Disposition </th>
<th> Master priority </th>
<TMPL_ELSE>
<th class="with_tooltip"
data-tippy-content="Lower numbers
indicate <a href='https://exoplanets.nasa.gov/exoplanet-watch/targetlists/'
target='_blank'>more valuable
targets</a> for Exoplanet Watch; click to sort."> Exoplanet Watch rank </th>
</TMPL_IF>
<th> Comments </th>
</tr>
</thead>
<tbody>
<TMPL_LOOP NAME="eclipse_info">
<tr>
<td style="text-align:center" data-sort="<TMPL_VAR NAME="sunset_jd">"
data-obs-start="<TMPL_VAR NAME="obs_start_jd">"
data-obs-end="<TMPL_VAR NAME="obs_end_jd">"
class="with_tooltip" data-tippy-content="Twilight UTC:
<br/><TMPL_VAR NAME="sunset_UTC_datetime"><br/><TMPL_VAR NAME="sunrise_UTC_datetime">"
data-header-label="<TMPL_VAR NAME="sunset_local_string">: <TMPL_VAR NAME="twilight_label">
<TMPL_VAR NAME="sunset_local_datetime">
— <TMPL_VAR NAME="sunrise_local_datetime">
local time /
<TMPL_VAR NAME="sunset_UTC_datetime">
— <TMPL_VAR NAME="sunrise_UTC_datetime">
UTC"
>
<TMPL_VAR NAME="sunset_local_string">
<TMPL_IF NAME="use_utc">(local date)</TMPL_IF>
</p>
<p> <TMPL_VAR NAME="twilight_label"><br/>
<TMPL_IF NAME="use_utc">
<TMPL_VAR NAME="sunset_time_UTC"> – <TMPL_VAR NAME="sunrise_time_UTC">
(UTC)
<TMPL_ELSE>
<TMPL_VAR NAME="sunset_time_local"> – <TMPL_VAR NAME="sunrise_time_local">
(<TMPL_VAR NAME="timezone">)
</TMPL_IF>
</p>
</td>
<td width="250"> <input type="checkbox" class="observation-select" class="with_tooltip"
data-tippy-content="Select to hide overlapping events"> <span class="with_tooltip" data-tippy-content="Query the next 90 days for this target." style="white-space: nowrap"><a
href="print_transits.cgi?observatory_string=<TMPL_VAR
NAME="observatory_string">&use_utc=<TMPL_VAR NAME="use_utc">&single_object=<TMPL_VAR
NAME="single_object">&observatory_latitude=<TMPL_VAR
NAME="observatory_latitude">&observatory_longitude=<TMPL_VAR
NAME="observatory_longitude">&timezone=<TMPL_VAR
NAME="timezone">&days_to_print=90&days_in_past=0&target_string=<TMPL_VAR
NAME="name">&minimum_start_elevation=<TMPL_VAR
NAME="minimum_start_elevation">&and_vs_or=<TMPL_VAR
NAME="and_vs_or">&minimum_end_elevation=<TMPL_VAR
NAME="minimum_end_elevation">&minimum_ha=<TMPL_VAR
NAME="minimum_ha">&maximum_ha=<TMPL_VAR
NAME="maximum_ha">&baseline_hrs=<TMPL_VAR
NAME="baseline_hrs">&show_unc=<TMPL_IF
EXPR="time_unc > 0">1</TMPL_IF>&minimum_priority=<TMPL_VAR
NAME="minimum_priority">&minimum_depth=<TMPL_VAR
NAME="minimum_depth">&print_html=1&twilight=<TMPL_VAR
NAME="twilight">" target='_blank'><TMPL_VAR NAME="name"></a></span> <TMPL_IF NAME="tess">(TOI <TMPL_VAR NAME="toi">)</TMPL_IF>
<br/>Finding charts:
<TMPL_IF EXPR="finding_chart">
<a href="<TMPL_VAR NAME="finding_chart">" target='_blank'>Annotated</a>,</TMPL_IF>
<a href="aladin.html?name=<TMPL_VAR NAME="name">&ra=<TMPL_VAR NAME="ra_deg">&dec=<TMPL_VAR NAME="dec_deg">&mag=<TMPL_IF EXPR="tmag"><TMPL_VAR NAME="tmag"><TMPL_ELSE><TMPL_VAR EXPR="vmag"></TMPL_IF>&depth=<TMPL_VAR NAME="depth">&showFov=<TMPL_VAR NAME="showFov">&fovHeight=<TMPL_VAR NAME="fovHeight">&fovWidth=<TMPL_VAR NAME="fovWidth">&fovPA=<TMPL_VAR NAME="fovPA">"
target="_blank">Aladin</a>, <a href="http://sky-map.org/?ra=<TMPL_VAR NAME="ra">&de=<TMPL_VAR NAME="dec">&zoom=8&show_box=1&show_grid=1&show_constellation_lines=1&show_constellation_boundaries=1&show_const_names=0&show_galaxies=1&img_source=DSS2" target='_blank'>
SkyMap</a>;
<br/>
<a
href="plot_airmass.cgi?observatory_string=<TMPL_VAR
NAME="observatory_string">&observatory_latitude=<TMPL_VAR
NAME="observatory_latitude">&observatory_longitude=<TMPL_VAR
NAME="observatory_longitude">&target=<TMPL_VAR
NAME="name">&ra=<TMPL_VAR NAME="ra">&dec=<TMPL_VAR
NAME="dec">&timezone=<TMPL_VAR NAME="timezone">&jd=<TMPL_VAR
NAME="sunset_jd">&jd_start=<TMPL_VAR NAME="jd_start">&jd_end=<TMPL_VAR
NAME="jd_end">&use_utc=<TMPL_VAR
NAME="use_utc">&max_airmass=<TMPL_VAR NAME="max_airmass">" target="_blank">Airmass
plot</a>,
<a
href="acp_plan.cgi?target=<TMPL_VAR
NAME="name">&ra=<TMPL_VAR NAME="ra">&dec=<TMPL_VAR
NAME="dec">&jd=<TMPL_VAR
NAME="sunset_jd">&jd_start=<TMPL_VAR NAME="jd_start">&jd_end=<TMPL_VAR
NAME="jd_end">&jd_quit=<TMPL_VAR NAME="obs_end_jd">&V=<TMPL_VAR NAME="vmag">" target="_blank">ACP plan</a>
<br/>Info: <TMPL_IF EXPR="target_page">
<a href="<TMPL_VAR NAME="target_page">" target='_blank'><TMPL_VAR NAME="target_page_label"></a>,
</TMPL_IF>
<a
href="https://simbad.u-strasbg.fr/simbad/sim-coo?output.format=HTML&Radius=15&Radius.unit=arcsec&Coord=<TMPL_VAR
NAME="coords">" target='_blank'>Simbad</a>,
<a
href="https://mast.stsci.edu/portal/Mashup/Clients/Mast/Portal.html?searchQuery=%7B%22service%22%3A%22GAIADR2%22%2C%22inputText%22%3A%22<TMPL_VAR
NAME="coords">%20r%3D150s%22%2C%22paramsService%22%3A%22Mast.Catalogs.GaiaDR2.Cone%22%2C%22title%22%3A%22Gaia%20(DR2)%3A%20<TMPL_VAR NAME="name">%20r%3D12...%22%2C%22columns%22%3A%22*%22%7D" target="_blank" class="with_tooltip" data-tippy-content="Search Gaia<br/>catalog at MAST">Gaia</a>,
<a
href="https://mast.stsci.edu/portal/Mashup/Clients/Mast/Portal.html?searchQuery=%7B%22service%22%3A%22TIC%22%2C%22inputText%22%3A%22<TMPL_VAR
NAME="coords">%20r%3D150s%22%2C%22paramsService%22%3A%22Mast.Catalogs.Tic.Cone%22%2C%22title%22%3A%22TIC%3A%20<TMPL_VAR NAME="name">%20r%3D12...%22%2C%22columns%22%3A%22*%22%7D" target="_blank">TIC</a>
</td>
<td style="vertical-align:center; text-align: center; padding:0px;" data-search="<TMPL_VAR NAME="vmag">" data-sort="<TMPL_VAR NAME="vmag">">
<div> <div> <TMPL_VAR NAME="vmag"><br /> <br /></div>
<div style="padding: 0px; vertical-align: bottom; border-top: 1px
solid grey; text-align: center;"><br />
<span <TMPL_IF EXPR="moon_metric > 100"> style="color:#E5542C"
</TMPL_IF> >Moon <TMPL_VAR NAME="moon_illum">%
@<TMPL_VAR NAME="moon_dist">°</span>
</div></div>
</td>
<td align="center" data-sort="<TMPL_VAR NAME="jd_start">" style="white-space: nowrap"
class="with_tooltip" data-tippy-content="Transit UTC:<br/><TMPL_IF EXPR="baseline_hrs > 0"><span style='display:block;margin-bottom:5px;'><TMPL_VAR NAME="pre_date_UTC"> <TMPL_VAR NAME="pre_time_UTC"></span></TMPL_IF><TMPL_VAR NAME="start_date_UTC"> <TMPL_VAR NAME="start_time_UTC"><br/><TMPL_VAR NAME="mid_date_UTC"> <TMPL_VAR NAME="mid_time_UTC"><br/><TMPL_VAR NAME="end_date_UTC"> <TMPL_VAR NAME="end_time_UTC"><TMPL_IF EXPR="baseline_hrs > 0"><span style='display:block;margin-top:5px;'><TMPL_VAR NAME="post_date_UTC"> <TMPL_VAR NAME="post_time_UTC"></span></TMPL_IF>">
<TMPL_IF EXPR="baseline_hrs > 0">
<span style="opacity:0.5;display:block;margin-bottom:6px;
<TMPL_IF EXPR="is_daytime_pre">color:MediumVioletRed</TMPL_IF>" >
<TMPL_IF EXPR="use_utc">
<TMPL_VAR NAME="pre_time_UTC">
<TMPL_ELSE>
<TMPL_VAR NAME="pre_time">
</TMPL_IF>
</span>
</TMPL_IF>
<span
<TMPL_IF EXPR="starts_before_sunset">
style="color:MediumVioletRed"
</TMPL_IF>
>
<TMPL_IF EXPR="use_utc">
<TMPL_VAR NAME="start_time_UTC"></span>—<br/>
<TMPL_ELSE>
<TMPL_VAR NAME="start_time"></span>—<br/>
</TMPL_IF>
<span
<TMPL_IF EXPR="middle_in_daytime">
style="color:MediumVioletRed"
</TMPL_IF>
>
<TMPL_IF EXPR="use_utc">
<TMPL_VAR NAME="mid_time_UTC">
<TMPL_ELSE>
<TMPL_VAR NAME="mid_time">
</TMPL_IF>
</span><br/><span style="white-space: nowrap">
—<span
<TMPL_IF EXPR="ends_after_sunrise">
style="color:MediumVioletRed"
</TMPL_IF>
><TMPL_IF EXPR="use_utc"><TMPL_VAR NAME="end_time_UTC"><TMPL_ELSE><TMPL_VAR NAME="end_time"></TMPL_IF>
</span></span>
<TMPL_IF EXPR="baseline_hrs > 0">
<span style="opacity:0.5;display:block;margin-top:6px;
<TMPL_IF EXPR="is_daytime_post">color:MediumVioletRed</TMPL_IF>" >
<TMPL_IF EXPR="use_utc">
<TMPL_VAR NAME="post_time_UTC">
<TMPL_ELSE>
<TMPL_VAR NAME="post_time">
</TMPL_IF>
</span>
</TMPL_IF>
<TMPL_IF EXPR="time_unc">
<span style="display:block;margin-top:4px;">±<TMPL_VAR NAME="time_unc"></span>
</TMPL_IF>
</td>
<td align="center"
data-sort="<TMPL_VAR NAME="duration_hrs">"> <TMPL_VAR NAME="duration">
<TMPL_IF EXPR="duration_unc">
<span style="display:block;margin-top:4px;">±<TMPL_VAR NAME="duration_unc"></span>
</TMPL_IF>
</td>
<td align="center" data-sort="<TMPL_VAR NAME="bjd_mid">">
<TMPL_VAR NAME="bjd_start"><br/> <TMPL_VAR NAME="bjd_mid"><br/>
<TMPL_VAR NAME="bjd_end"> </td>
<td align="center" data-sort="<TMPL_VAR NAME="start_el">">
<TMPL_IF EXPR="baseline_hrs > 0"> <span style="opacity:0.5;display:block;margin-bottom:8px;
<TMPL_IF EXPR="el_pre < minimum_start_elevation">color:red
</TMPL_IF>" >
<TMPL_VAR NAME="el_pre">° </span>
</TMPL_IF>
<span <TMPL_IF EXPR="start_el < minimum_start_elevation"> style="color:red"
</TMPL_IF> >
<TMPL_VAR NAME="start_el">°</span>, <br />
<span <TMPL_IF EXPR="(mid_el < minimum_start_elevation) || (mid_el < minimum_end_elevation)"> style="color:red"
</TMPL_IF> >
<TMPL_VAR NAME="mid_el">°</span>, <br />
<span <TMPL_IF EXPR="end_el < minimum_end_elevation"> style="color:red"
</TMPL_IF> >
<TMPL_VAR NAME="end_el">°</span>
<TMPL_IF EXPR="baseline_hrs > 0"> <span style="opacity:0.5;display:block;margin-top:8px;
<TMPL_IF EXPR="el_post < minimum_end_elevation">color:red;
</TMPL_IF>" >
<TMPL_VAR NAME="el_post">°</span>
</TMPL_IF>
</td>
<td align="center"
data-sort="<TMPL_VAR EXPR="transit_fraction+baseline_fraction">"
data-search="<TMPL_VAR EXPR="transit_fraction+baseline_fraction">"
class="with_tooltip"
data-tippy-content="Obs. start/end UTC:</br><TMPL_VAR NAME="obs_start_utc"><br/><TMPL_VAR NAME="obs_end_utc">">
<svg viewbox="0 0 1000 560" width="100%"><TMPL_VAR NAME="svg_path">
</svg><br/>
<TMPL_VAR NAME="transit_fraction">% (<TMPL_VAR NAME="baseline_fraction">%) <br/> <TMPL_VAR NAME="obs_start_time">—<TMPL_VAR NAME="obs_end_time"> </td>
<td align="center" data-sort="<TMPL_VAR NAME="start_az">">
<TMPL_IF EXPR="baseline_hrs > 0">
<span style="opacity:0.5;display:block;margin-bottom:8px;">
<TMPL_VAR NAME="az_pre">°
</span>
</TMPL_IF>
<TMPL_VAR NAME="start_az">°, <br />
<TMPL_VAR NAME="mid_az">°, <br />
<TMPL_VAR NAME="end_az">°
<TMPL_IF EXPR="baseline_hrs > 0">
<span style="opacity:0.5;display:block;margin-top:8px;">
<TMPL_VAR NAME="az_post">°
</span>
</TMPL_IF>
</td>
<td align="center">
<TMPL_IF EXPR="baseline_hrs > 0">
<span style="opacity:0.5;display:block;margin-bottom:8px;
<TMPL_IF EXPR="(ha_pre < minimum_ha) || (ha_pre > maximum_ha)">color:red;
</TMPL_IF>" >
<TMPL_VAR NAME="ha_pre">
</span>
</TMPL_IF>