Skip to content

Commit

Permalink
Merge pull request #406 from askap-vast/issue-384-add-meas-flux-perce…
Browse files Browse the repository at this point in the history
…ntage

Added island flux ratio columns
  • Loading branch information
ajstewart authored Nov 16, 2020
2 parents 6678a59 + 412f25a commit 5a4cb4a
Show file tree
Hide file tree
Showing 14 changed files with 345 additions and 67 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Added

- Added new fields to detail pages and source and measurement tables [#406](https://github.com/askap-vast/vast-pipeline/pull/406).
- Added new fields to source query page (island flux ratio, min and max fluxes) [#406](https://github.com/askap-vast/vast-pipeline/pull/406).
- Added min, max flux values to sources and agg min island flux ratio field [#406](https://github.com/askap-vast/vast-pipeline/pull/406).
- Added island flux ratio column to measurements, component flux divided by total island flux (peak and int) [#406](https://github.com/askap-vast/vast-pipeline/pull/406).
- Added a maximum number of images for runs through the UI [#404](https://github.com/askap-vast/vast-pipeline/pull/404).
- Added the ability to run a pipeline run through the UI [#404](https://github.com/askap-vast/vast-pipeline/pull/404).
- Added `Queued` status to the list of pipeline run statuses [#404](https://github.com/askap-vast/vast-pipeline/pull/404).
Expand Down Expand Up @@ -52,6 +56,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Changed

- Naming of average flux query fields to account for other min max flux fields [#406](https://github.com/askap-vast/vast-pipeline/pull/406).
- Expanded `README.md` to include `DjangoQ` and UI job scheduling information [#404](https://github.com/askap-vast/vast-pipeline/pull/404).
- Shifted alerts location to the top right [#404](https://github.com/askap-vast/vast-pipeline/pull/404).
- Log file card now expanded by default on pipeline run detail page [#404](https://github.com/askap-vast/vast-pipeline/pull/404).
Expand Down Expand Up @@ -101,6 +106,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### List of PRs

- [#406](https://github.com/askap-vast/vast-pipeline/pull/406) feat, model: Added island flux ratio columns.
- [#402](https://github.com/askap-vast/vast-pipeline/pull/402) fix: Fixed rms value calculation in non-cluster forced extractions.
- [#404](https://github.com/askap-vast/vast-pipeline/pull/404) feat, dep, model: Completed schedule pipe run.
- [#396](https://github.com/askap-vast/vast-pipeline/pull/396) feat: added source tagging.
Expand Down
83 changes: 63 additions & 20 deletions static/js/datatables-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ $(document).ready(function() {
"targets": 3,
"data": "image",
"render": function ( data, type, row, meta ) {
return '<a href="' + img_url + row[17] + '"target="_blank">' + row[3] + '</a>';
return '<a href="' + img_url + row[19] + '"target="_blank">' + row[3] + '</a>';
}
},
{
Expand Down Expand Up @@ -168,48 +168,62 @@ $(document).ready(function() {
},
{
"targets": 9,
"data": "flux_int",
"data": "flux_peak",
"render": function ( data, type, row, meta ) {
return (row[9]).toFixed(3);
}
},
{
"targets": 10,
"data": "flux_int_err",
"data": "flux_peak_err",
"render": function ( data, type, row, meta ) {
return (row[10]).toFixed(3);
}
},
{
"targets": 11,
"data": "flux_peak",
"data": "flux_peak_isl_ratio",
"render": function ( data, type, row, meta ) {
return (row[11]).toFixed(3);
return (row[11]).toFixed(2);
}
},
{
"targets": 12,
"data": "flux_peak_err",
"data": "flux_int",
"render": function ( data, type, row, meta ) {
return (row[12]).toFixed(3);
}
},
{
"targets": 13,
"data": "local_rms",
"data": "flux_int_err",
"render": function ( data, type, row, meta ) {
return (row[13]).toFixed(2);
return (row[13]).toFixed(3);
}
},
{
"targets": 14,
"data": "snr",
"data": "flux_int_isl_ratio",
"render": function ( data, type, row, meta ) {
return (row[14]).toFixed(2);
}
},
{
"targets": 17,
"targets": 15,
"data": "local_rms",
"render": function ( data, type, row, meta ) {
return (row[15]).toFixed(2);
}
},
{
"targets": 16,
"data": "snr",
"render": function ( data, type, row, meta ) {
return (row[16]).toFixed(2);
}
},
{
"targets": 19,
"searchable": false,
"visible": false
}
Expand Down Expand Up @@ -297,14 +311,41 @@ $(document).ready(function() {
if (unit.value) {
qry_url = qry_url + "&radiusunit=" + unit.value
}
let flux_type = document.getElementById("aveFluxSelect");
let flux_min = document.getElementById("fluxMinSelect");
let flux_max = document.getElementById("fluxMaxSelect");
if (flux_min.value) {
qry_url = qry_url + "&min_" + flux_type.value + "=" + flux_min.value;
};
if (flux_max.value) {
qry_url = qry_url + "&max_" + flux_type.value + "=" + flux_max.value;
let avg_flux_type = document.getElementById("aveFluxSelect");
let avg_flux_min = document.getElementById("avgFluxMinSelect");
let avg_flux_max = document.getElementById("avgFluxMaxSelect");
if (avg_flux_min.value) {
qry_url = qry_url + "&min_" + avg_flux_type.value + "=" + avg_flux_min.value;
};
if (avg_flux_max.value) {
qry_url = qry_url + "&max_" + avg_flux_type.value + "=" + avg_flux_max.value;
};
let min_flux_type = document.getElementById("minFluxSelect");
let min_flux_min = document.getElementById("fluxMinMinSelect");
let min_flux_max = document.getElementById("fluxMaxMinSelect");
if (min_flux_min.value) {
qry_url = qry_url + "&min_" + min_flux_type.value + "=" + min_flux_min.value;
};
if (min_flux_max.value) {
qry_url = qry_url + "&max_" + min_flux_type.value + "=" + min_flux_max.value;
};
let max_flux_type = document.getElementById("maxFluxSelect");
let max_flux_min = document.getElementById("fluxMinMaxSelect");
let max_flux_max = document.getElementById("fluxMaxMaxSelect");
if (max_flux_min.value) {
qry_url = qry_url + "&min_" + max_flux_type.value + "=" + max_flux_min.value;
};
if (max_flux_max.value) {
qry_url = qry_url + "&max_" + max_flux_type.value + "=" + max_flux_max.value;
};
let isl_ratio_flux_type = document.getElementById("fluxIslSelect");
let isl_ratio_min = document.getElementById("fluxIslMinSelect");
let isl_ratio_max = document.getElementById("fluxIslMaxSelect");
if (isl_ratio_min.value) {
qry_url = qry_url + "&min_" + isl_ratio_flux_type.value + "=" + isl_ratio_min.value;
};
if (isl_ratio_max.value) {
qry_url = qry_url + "&max_" + isl_ratio_flux_type.value + "=" + isl_ratio_max.value;
};
let var_v_type = document.getElementById("varVMetricSelect");
let var_v_min = document.getElementById("varVMinSelect");
Expand Down Expand Up @@ -444,13 +485,15 @@ $(document).ready(function() {
return this.defaultSelected
});
let inputs = [
'fluxMinSelect', 'fluxMaxSelect', 'varVMinSelect', 'varVMaxSelect',
'avgFluxMinSelect', 'avgFluxMaxSelect', 'varVMinSelect', 'varVMaxSelect',
'fluxIslMinSelect', 'fluxIslMaxSelect', 'fluxMinMinSelect', 'fluxMinMaxSelect',
'varEtaMinSelect', 'varEtaMaxSelect', 'ForcedMinSelect', 'ForcedMaxSelect',
'coordInput', 'radiusSelect', 'datapointMinSelect', 'datapointMaxSelect',
'RelationsMinSelect', 'RelationsMaxSelect', 'SelavyMinSelect', 'SelavyMaxSelect',
'NewSigmaMinSelect', 'NewSigmaMaxSelect', 'NeighbourMinSelect', 'NeighbourMaxSelect',
'compactnessMinSelect', 'compactnessMaxSelect', 'objectNameInput', 'MinSnrMinSelect',
'MinSnrMaxSelect', 'MaxSnrMinSelect', 'MaxSnrMaxSelect',
'MinSnrMaxSelect', 'MaxSnrMinSelect', 'MaxSnrMaxSelect', 'fluxMaxMinSelect',
'fluxMaxMaxSelect',
];
var input;
for (input of inputs) {
Expand Down
6 changes: 4 additions & 2 deletions templates/measurement_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,17 @@ <h6 class="m-0 font-weight-bold text-primary">Details</h6>
<strong>Has siblings: </strong>{{ measurement.has_siblings }}
{% if measurement.has_siblings %}
(<a href="#siblingHeader">Table</a>)
{% endif %}
{% endif %}<br>
<strong>Peak Flux Island Ratio: </strong>{{ measurement.flux_peak_isl_ratio|floatformat:2 }}<br>
<strong>Int. Flux Island Ratio: </strong>{{ measurement.flux_int_isl_ratio|floatformat:2 }}
</p>
</div>
<div class="col-md">
<p>
<strong>Peak Flux: </strong>{{ measurement.flux_peak|floatformat:3 }} &plusmn;
{{ measurement.flux_peak_err|floatformat:3 }} mJy/beam<br>
<strong>Int. Flux: </strong>{{ measurement.flux_int|floatformat:3 }} &plusmn;
{{ measurement.flux_int_err|floatformat:3 }} mJy
{{ measurement.flux_int_err|floatformat:3 }} mJy<br>
</p>
<p>
<strong>SNR: </strong>{{ measurement.snr|floatformat:2 }}<br>
Expand Down
22 changes: 18 additions & 4 deletions templates/source_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,24 @@ <h6 class="m-0 font-weight-bold text-primary">Details</h6>
{{ source.wavg_b|floatformat:6 }}</span>
</p>
<p>
<strong>Avg. Int. Flux: </strong>{{ source.avg_flux_int|floatformat:3 }} mJy<br>
<strong>Avg. Peak Flux: </strong>{{ source.avg_flux_peak|floatformat:3 }} mJy/beam<br>
<strong>Max Peak Flux: </strong>{{ source.max_flux_peak|floatformat:3 }} mJy/beam
</p>
<div class="row">
<div class="col-xl">
<p>
<strong>Avg. Int. Flux: </strong>{{ source.avg_flux_int|floatformat:3 }} mJy<br>
<strong>Min. Int. Flux: </strong>{{ source.min_flux_int|floatformat:3 }} mJy<br>
<strong>Max Int. Flux: </strong>{{ source.max_flux_int|floatformat:3 }} mJy<br>
<strong>Min Int. Flux Isl. Ratio: </strong>{{ source.min_flux_int_isl_ratio|floatformat:2 }}
</p>
</div>
<div class="col-xl">
<p>
<strong>Avg. Peak Flux: </strong>{{ source.avg_flux_peak|floatformat:3 }} mJy/beam<br>
<strong>Min. Peak Flux: </strong>{{ source.min_flux_peak|floatformat:3 }} mJy/beam<br>
<strong>Max Peak Flux: </strong>{{ source.max_flux_peak|floatformat:3 }} mJy/beam<br>
<strong>Min Peak Flux Isl. Ratio: </strong>{{ source.min_flux_peak_isl_ratio|floatformat:2 }}
</p>
</div>
</div>
<div class="row">
<div class="col-xl">
<p>
Expand Down
Loading

0 comments on commit 5a4cb4a

Please sign in to comment.