diff --git a/imageflow/static/imageflow/js/shared.js b/imageflow/static/imageflow/js/shared.js index 23467f9..bcc8a6b 100644 --- a/imageflow/static/imageflow/js/shared.js +++ b/imageflow/static/imageflow/js/shared.js @@ -22,6 +22,15 @@ function plotImage($container, canvas, imageUrl, opts) { 0, 0, img.width * ratio, img.height * ratio); // Then plot stars from the data source. + if (window.comparisonStarData) { + plotStars(canvas, window.comparisonStarData, { + color: '#4B008', + radius: 6, + text: function(star) { + return star.id; + } + }); + } if (window.catalogData) { plotStars(canvas, window.catalogData, { color: 'red', diff --git a/lightcurve/static/lightcurve/js/lightcurve.js b/lightcurve/static/lightcurve/js/lightcurve.js index d9ac88d..7456e29 100644 --- a/lightcurve/static/lightcurve/js/lightcurve.js +++ b/lightcurve/static/lightcurve/js/lightcurve.js @@ -259,6 +259,8 @@ $(function() { setupFilterSelection(); setupModals(); setupAddAllImages(); + + setupPlot(); }); })(); diff --git a/lightcurve/templates/lightcurve.html b/lightcurve/templates/lightcurve.html index 04771fd..7260521 100644 --- a/lightcurve/templates/lightcurve.html +++ b/lightcurve/templates/lightcurve.html @@ -163,6 +163,7 @@

Comparison Stars

Magnitudes shown are from the first image. To review comparison stars in more detail, review the 'Reference Stars' page for each image.

+ {% include 'partials/comparison_stars_plot.html' %} {% include 'partials/comparison_stars.html' %} {% else %}

Uh oh - there are no common stars. Please tune your photometry to make sure some known stars are picked up, then try again.

@@ -400,10 +401,13 @@ window.lightcurveId = {{lightcurve.id | jsonify}}; window.comparisonStars = {{lightcurve.comparison_stars | jsonify}}; window.commonStars = {{lightcurve.common_stars | jsonify}}; + window.originalImageUrl = {{images.0.analysis.original_display_url | jsonify}}; + window.comparisonStarData = {{ lightcurve.common_stars | jsonify }}; + diff --git a/lightcurve/templates/partials/comparison_stars_plot.html b/lightcurve/templates/partials/comparison_stars_plot.html new file mode 100644 index 0000000..130aafe --- /dev/null +++ b/lightcurve/templates/partials/comparison_stars_plot.html @@ -0,0 +1,12 @@ +
+
+

+ Field position: + (0, + 0) +

+
+ +
+
+