Skip to content
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
5223133
Updated deps
ajstewart Jul 10, 2023
c4238a1
Reset migrations for version 2
ajstewart Jul 10, 2023
9f213d9
Working image ingest using UUID
ajstewart Jul 10, 2023
ec8dc54
Update images website to handle uuids still WIP
ajstewart Jul 11, 2023
c500ec5
Working basic association, ideal and new source analysis
ajstewart Jul 11, 2023
96e6463
Updated advanced methods
ajstewart Jul 11, 2023
e085b4f
Updated forced extraction
ajstewart Jul 11, 2023
9d7a79a
Working UUID normal run end to end and website
ajstewart Jul 17, 2023
6c39836
Parallel association and epoch mode support
ajstewart Jul 18, 2023
3b20954
Working add mode
ajstewart Jul 18, 2023
4b8a967
Return parallel forced extraction
ajstewart Jul 18, 2023
f8289ba
Fixed some tests
ajstewart Jul 18, 2023
406a04f
Fixed remaining failing tests
ajstewart Jul 19, 2023
17bcf14
Fixed source search by id
ajstewart Jul 19, 2023
a561801
Working image ingest using UUID
ajstewart Jul 10, 2023
8fc80ca
Working basic association, ideal and new source analysis
ajstewart Jul 11, 2023
53f193f
Initial measurements django copy
ajstewart Jul 18, 2023
57c97a9
Working measurements batch copying
ajstewart Jul 19, 2023
c55c2ad
Implement copy sources
ajstewart Jul 19, 2023
e56a5a5
Working related and associations
ajstewart Jul 19, 2023
2f2bb89
Added docstrings
ajstewart Jul 19, 2023
43ed539
Fix set with copy and added logging
ajstewart Jul 19, 2023
baf3c15
Fix upload when pair_metrics is False
ajstewart Jul 19, 2023
e5e0cd3
Write fix better
ajstewart Jul 19, 2023
9e0ba8d
Merge remote-tracking branch 'ajstewart/django-postgres-copy-support'…
mauch Jan 24, 2025
dbbeb56
Change sources_df_upload to associations_df_upload where required.
mauch Jan 24, 2025
da47496
Initialise mem_csv in `copy_upload_model`
mauch Jan 24, 2025
86058e0
Make delete_pipeline_run_raw_sql work with UUIDs
mauch Jan 24, 2025
c9960a2
fix minor bugs related to mearge earlier.
mauch Jan 24, 2025
a4d680c
tests passing.
mauch Jan 24, 2025
45dc920
Remove unused imports.
mauch Jan 24, 2025
f896cbf
Temp remove vaex-core dep.
mauch Jan 24, 2025
09b7c76
Update poetry.lock
mauch Jan 24, 2025
51d6bc4
Make `object_id` a UUIDField in Comment Model.
mauch Jan 28, 2025
e3a2d21
Update migrations.
mauch Jan 28, 2025
d5e81d6
Fix `Prev` and `Next` buttons in the web interface.
mauch Jan 28, 2025
2891692
Update ID reference in source query page.
mauch Jan 28, 2025
5912a20
Merge branch 'v2.0' into UUID_indexes
mauch Jan 30, 2025
c0fa4fd
Fix for tagulous tags deletion - check no other images reference the …
mauch Jan 30, 2025
e81f140
Add q3c migration.
mauch Jan 30, 2025
2cb6d44
Update CHANGELOG.md
mauch Jan 30, 2025
9f63598
Remove unnecessary comment
mauch Jan 30, 2025
9ee0307
rename sources_df to associations_df before upload
mauch Jan 30, 2025
a14286c
Update result table to show UUIDs
mauch Jan 31, 2025
43ddd4e
Remove stray useless statement in test.
mauch Jan 31, 2025
b441bc4
Minimise django_postgres_copy logging.
mauch Feb 3, 2025
6ada213
Add shortuuid as a dependency.
mauch Feb 4, 2025
e126b9f
Add short uuid generator with length option.
mauch Feb 4, 2025
9bdee72
Change from UUID to shortUUID throughout.
mauch Feb 4, 2025
76a7125
Change forced measurements ID to use base p_run ID.
mauch Feb 4, 2025
7ff6704
Update serializers.
mauch Feb 4, 2025
6691fe7
webinterface: Fix list of images in run page and list of measurments …
mauch Feb 4, 2025
7f09997
Fix broken q3c searches in web interface.
mauch Feb 4, 2025
2b2a168
Update schema images in docs.
mauch Feb 4, 2025
e7de220
Add optional UUID lengths for different models.
mauch Feb 5, 2025
1f3230d
Update comments in association.
mauch Feb 5, 2025
c082486
update comments in new_sources and utils
mauch Feb 5, 2025
0079ecc
update comments in forced_extraction.
mauch Feb 5, 2025
467276b
Remove stray debug log.
mauch Feb 5, 2025
7f2cecb
Update results metadata for parallel association.
mauch Feb 6, 2025
a0dcb5d
Update comments in finalise
mauch Feb 6, 2025
d22384e
Update comments in pairs.py
mauch Feb 6, 2025
9deef39
Fix wrong UUID length for initial source creation.
mauch Feb 6, 2025
00f6b55
Passing tests.
mauch Feb 6, 2025
6daf236
Remove stray debug write.
mauch Feb 6, 2025
7755f3e
Update vast_pipeline/pipeline/association.py
mauch Feb 6, 2025
28e368b
Update vast_pipeline/pipeline/association.py
mauch Feb 6, 2025
080892e
Update vast_pipeline/pipeline/association.py
mauch Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Added

- V2: Use `django-postgres-copy` for database uploads [#803](https://github.com/askap-vast/vast-pipeline/pull/803)
- Added more detailed warnings about the use of Condon Errors throughout the docs and code [#806](https://github.com/askap-vast/vast-pipeline/pull/806)
- Added processing configuration parameters to the run configuration documentation [#805](https://github.com/askap-vast/vast-pipeline/pull/805)
- Added option to disable forced photometry clustering [#788](https://github.com/askap-vast/vast-pipeline/pull/788)
- Added additional logging to forced extraction step [#788](https://github.com/askap-vast/vast-pipeline/pull/788)

#### Changed

- V2: Replace all source, measurement, run etc. IDs with UUID indices. [#803](https://github.com/askap-vast/vast-pipeline/pull/803)
- V2: Updated docs dependencies and fixed outdated information and various warnings [#801](https://github.com/askap-vast/vast-pipeline/pull/801)
- V2: Reorganise new_high_sigma calculation into dedicated function [#714](https://github.com/askap-vast/vast-pipeline/pull/714)
- V2: Update dependencies to fix dependabot warnings and prepare for Dask distributed implementation.
Expand All @@ -26,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Fixed

- V2: Fix bug when deleting source tags from database which are referenced by multiple sources [#803](https://github.com/askap-vast/vast-pipeline/pull/803)
- Fixed incorrect error ellipse calculation [#792](https://github.com/askap-vast/vast-pipeline/pull/792)
- V2: Fix incorrect calculation of the new_high_sigma parameter [#714](https://github.com/askap-vast/vast-pipeline/pull/714)
- Fixed broken links on pipeline websites [#802](https://github.com/askap-vast/vast-pipeline/pull/802)
Expand All @@ -40,6 +43,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### List of PRs

- [#803](https://github.com/askap-vast/vast-pipeline/pull/803): feat: V2: Change to UUID indexes and use `django-postgres-copy`.
- [#792](https://github.com/askap-vast/vast-pipeline/pull/792): fix: Simplify and correct error ellipse calculation.
- [#801](https://github.com/askap-vast/vast-pipeline/pull/801): docs, dep: v2: Updated docs dependencies and fixed outdated information and various warnings
- [#714](https://github.com/askap-vast/vast-pipeline/pull/714): fix: V2: Correctly calculate new_high_sigma parameter
Expand Down
Binary file modified docs/img/schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/schema_pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
419 changes: 416 additions & 3 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ psutil = "^5.9"
psycopg2 = "^2.9.10"
pyarrow = "^18.1"
scipy = "^1.15"
shortuuid = "^1.0"
social-auth-app-django = "^5.4.2"
social-auth-core = "^4.5.4"
sqlalchemy = "^2.0.17"
Expand Down
102 changes: 51 additions & 51 deletions static/js/datatables-pipeline.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let DEFAULT_DATATABLE_BUTTONS = [
{extend: 'colvis', className: 'btn-info btn-sm'},
{extend: 'csv', className: 'btn-info btn-sm'},
{extend: 'excel', className: 'btn-info btn-sm'},
{ extend: 'colvis', className: 'btn-info btn-sm' },
{ extend: 'csv', className: 'btn-info btn-sm' },
{ extend: 'excel', className: 'btn-info btn-sm' },
]

// Formatting function for API
Expand All @@ -10,15 +10,15 @@ function obj_formatter(obj) {
let hrefValue = null;
if (obj.render.url.hasOwnProperty('nested')) {
let [prefix, col] = [obj.render.url.prefix, obj.render.url.col];
hrefValue = function(data, type, row, meta) {
hrefValue = function (data, type, row, meta) {
// split the col on the . for nested JSON and build the selection
let sel = row;
col.split('.').forEach(item => sel = sel[item]);
return '<a href="' + prefix + sel.id + ' "target="_blank">' + data + '</a>';
};
} else {
let [prefix, col] = [obj.render.url.prefix, obj.render.url.col];
hrefValue = function(data, type, row, meta) {
hrefValue = function (data, type, row, meta) {
return '<a href="' + prefix + row.id + ' "target="_blank">' + row[col] + '</a>';
};
}
Expand All @@ -30,14 +30,14 @@ function obj_formatter(obj) {
obj.render.float.scale,
obj.render.float.col
];
let floatFormat = function(data, type, row, meta) {
return (row[col] * scale).toFixed(precision);
let floatFormat = function (data, type, row, meta) {
return (row[col] * scale).toFixed(precision);
};
obj.render = floatFormat;
return obj;
} else if (obj.render.hasOwnProperty('contains_sibl')) {
let col = obj.render.contains_sibl.col;
let sibl_bool = function(data, type, row, meta) {
let sibl_bool = function (data, type, row, meta) {
if (row[col] > 0) {
return true;
} else {
Expand Down Expand Up @@ -66,7 +66,7 @@ function drawExternalResultsTable(id, buttons = DEFAULT_DATATABLE_BUTTONS) {
"columnDefs": [
{
"targets": 0,
"render": function( data, type, row, meta) {
"render": function (data, type, row, meta) {
if (row["database"] === "SIMBAD") {
return '<a href="http://simbad.u-strasbg.fr/simbad/sim-id?Ident=' + row['object_name'] + '" target="_blank">' + row['object_name'] + '</a> (' + row['database'] + ')'
} else if (row["database"] == "NED") {
Expand All @@ -80,13 +80,13 @@ function drawExternalResultsTable(id, buttons = DEFAULT_DATATABLE_BUTTONS) {
},
{
"targets": 1,
"render": function ( data, type, row, meta ) {
"render": function (data, type, row, meta) {
return row['separation_arcsec'].toFixed(2);
}
},
{
"targets": 2,
"render": function ( data, type, row, meta ) {
"render": function (data, type, row, meta) {
if (row['otype_long'] !== "" && row['otype'] !== row['otype_long']) {
return '<abbr title="' + row['otype_long'] + '">' + row['otype'] + '</abbr>';
} else {
Expand All @@ -101,7 +101,7 @@ function drawExternalResultsTable(id, buttons = DEFAULT_DATATABLE_BUTTONS) {


// Call the dataTables jQuery plugin
$(document).ready(function() {
$(document).ready(function () {

$('[data-toggle="tooltip"]').tooltip();
let dom = (
Expand All @@ -116,12 +116,12 @@ $(document).ready(function() {
dataConfParsed = JSON.parse(dataConfElement.textContent);
dataConfList = (Array.isArray(dataConfParsed)) ? dataConfParsed : [dataConfParsed];
}
for (let dataConf of dataConfList){
for (let dataConf of dataConfList) {
let table_id = (dataConfList.length == 1) ? '#dataTable' : '#' + dataConf.table_id;
if (dataConf.hasOwnProperty('api')) {
// build conf for server side datatable
let testFields = dataConf.colsFields;
testFields.forEach( function(obj) {
testFields.forEach(function (obj) {
if (obj.hasOwnProperty('render')) {
obj = obj_formatter(obj)
}
Expand All @@ -134,7 +134,7 @@ $(document).ready(function() {
language: {
processing: (
'<div class="spinner-border" role="status">' +
'<span class="sr-only">Loading...</span>' +
'<span class="sr-only">Loading...</span>' +
'</div>'
)
},
Expand All @@ -151,14 +151,14 @@ $(document).ready(function() {
columns: dataConf.colsFields,
order: dataConf.order,
searchDelay: 2000,
dom : dom,
dom: dom,
buttons: DEFAULT_DATATABLE_BUTTONS
};
// apply deferLoading config, if supplied
if (dataConf.hasOwnProperty('deferLoading')) {
dataTableConf.deferLoading = dataConf.deferLoading;
// change the message printed in the empty table if deferLoading active
dataTableConf.initComplete = function(settings, json) {
dataTableConf.initComplete = function (settings, json) {
$("td.dataTables_empty").text("Submit a query to view results");
}
}
Expand All @@ -171,9 +171,9 @@ $(document).ready(function() {
// ...
// ];
let dataSet = [];
dataConf.dataQuery.forEach( function(obj) {
dataConf.dataQuery.forEach(function (obj) {
let row = [];
dataConf.colsFields.forEach(function(elem) {
dataConf.colsFields.forEach(function (elem) {
row.push(obj[elem])
})
dataSet.push(row)
Expand Down Expand Up @@ -201,106 +201,106 @@ $(document).ready(function() {
{
"targets": 1,
"data": "name",
"render": function ( data, type, row, meta ) {
"render": function (data, type, row, meta) {
return '<a href="' + meas_url + row[0] + '"target="_blank">' + row[1] + '</a>';
}
},
{
"targets": 3,
"data": "image",
"render": function ( data, type, row, meta ) {
"render": function (data, type, row, meta) {
return '<a href="' + img_url + row[19] + '"target="_blank">' + row[3] + '</a>';
}
},
{
"targets": 4,
"data": "frequency",
"render": function ( data, type, row, meta ) {
"render": function (data, type, row, meta) {
return row[4].toFixed(2);
}
},
{
"targets": 5,
"data": "ra",
"render": function ( data, type, row, meta ) {
"render": function (data, type, row, meta) {
return row[5].toFixed(4);
}
},
{
"targets": 6,
"data": "ra_err",
"render": function ( data, type, row, meta ) {
return (row[6] * 3600.).toFixed(4);
"render": function (data, type, row, meta) {
return (row[6] * 3600.).toFixed(4);
}
},
{
"targets": 7,
"data": "dec",
"render": function ( data, type, row, meta ) {
return row[7].toFixed(4);
"render": function (data, type, row, meta) {
return row[7].toFixed(4);
}
},
{
"targets": 8,
"data": "dec_err",
"render": function ( data, type, row, meta ) {
return (row[8] * 3600.).toFixed(4);
"render": function (data, type, row, meta) {
return (row[8] * 3600.).toFixed(4);
}
},
{
"targets": 9,
"data": "flux_peak",
"render": function ( data, type, row, meta ) {
return (row[9]).toFixed(3);
"render": function (data, type, row, meta) {
return (row[9]).toFixed(3);
}
},
{
"targets": 10,
"data": "flux_peak_err",
"render": function ( data, type, row, meta ) {
return (row[10]).toFixed(3);
"render": function (data, type, row, meta) {
return (row[10]).toFixed(3);
}
},
{
"targets": 11,
"data": "flux_peak_isl_ratio",
"render": function ( data, type, row, meta ) {
return (row[11]).toFixed(2);
"render": function (data, type, row, meta) {
return (row[11]).toFixed(2);
}
},
{
"targets": 12,
"data": "flux_int",
"render": function ( data, type, row, meta ) {
return (row[12]).toFixed(3);
"render": function (data, type, row, meta) {
return (row[12]).toFixed(3);
}
},
{
"targets": 13,
"data": "flux_int_err",
"render": function ( data, type, row, meta ) {
return (row[13]).toFixed(3);
"render": function (data, type, row, meta) {
return (row[13]).toFixed(3);
}
},
{
"targets": 14,
"data": "flux_int_isl_ratio",
"render": function ( data, type, row, meta ) {
return (row[14]).toFixed(2);
"render": function (data, type, row, meta) {
return (row[14]).toFixed(2);
}
},
{
"targets": 15,
"data": "local_rms",
"render": function ( data, type, row, meta ) {
return (row[15]).toFixed(2);
"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);
"render": function (data, type, row, meta) {
return (row[16]).toFixed(2);
}
},
{
Expand All @@ -318,7 +318,7 @@ $(document).ready(function() {
drawExternalResultsTable('#externalResultsTable');

// Trigger the update search on the datatable
$("#catalogSearch").on('click', function(e) {
$("#catalogSearch").on('click', function (e) {
let PipeRun = document.getElementById("runSelect");
let qry_url = dataConfParsed.api;
if (PipeRun.value != '') {
Expand All @@ -338,7 +338,7 @@ $(document).ready(function() {
qry_url = qry_url + "&coord=" + encodeURIComponent(coord.value);
};
if (unit.value) {
qry_url = qry_url + "&radiusunit=" + unit.value
qry_url = qry_url + "&radiusunit=" + unit.value
}
let avg_flux_type = document.getElementById("aveFluxSelect");
let avg_flux_min = document.getElementById("avgFluxMinSelect");
Expand Down Expand Up @@ -510,7 +510,7 @@ $(document).ready(function() {
qry_url = qry_url + "&source_selection=" + source_selection.value;
};
if (source_selection_type.value) {
qry_url = qry_url + "&source_selection_type=" +source_selection_type.value;
qry_url = qry_url + "&source_selection_type=" + source_selection_type.value;
};
table.ajax.url(qry_url);
table.ajax.reload();
Expand All @@ -522,8 +522,8 @@ $(document).ready(function() {
});

// Trigger the search reset on the datatable
$("#resetSearch").on('click', function(e) {
$('#runSelect option').prop('selected', function() {
$("#resetSearch").on('click', function (e) {
$('#runSelect option').prop('selected', function () {
return this.defaultSelected
});
let inputs = [
Expand All @@ -536,7 +536,7 @@ $(document).ready(function() {
'compactnessMinSelect', 'compactnessMaxSelect', 'objectNameInput', 'MinSnrMinSelect',
'MinSnrMaxSelect', 'MaxSnrMinSelect', 'MaxSnrMaxSelect', 'fluxMaxMinSelect',
'fluxMaxMaxSelect', 'sourceSelectionSelect',
];
];
var input;
for (input of inputs) {
document.getElementById(input).value = '';
Expand Down
2 changes: 1 addition & 1 deletion templates/sources_etav_plot.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h6 class="m-0 font-weight-bold text-primary float-left">Selected Source Light C

function update_card(id) {
$('#cardsUpdate').html('').load(
"{% url 'vast_pipeline:source_etav_plot_update' 0 %}".replace('0', id),
"{% url 'vast_pipeline:source_etav_plot_update' 'e1f6bf88-4b07-4f28-bf9b-3ccf9d2ca813' %}".replace('e1f6bf88-4b07-4f28-bf9b-3ccf9d2ca813', id),
function() {
// redraw the external results table, function is defined in datatables-pipeline.js
drawExternalResultsTable('#externalResultsTable');
Expand Down
2 changes: 1 addition & 1 deletion templates/sources_query.html
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ <h6 class="m-0 font-weight-bold text-primary">
"Select sources directly by either their Name or ID value. Must be entered as a comma separated list, e.g. 'J002611.16-751830.46, J013850.13-743544.66'."
><i class="fas fa-info-circle"></i></a></label>
<div class="col">
<textarea id="sourceSelectionSelect" name="source_selection" class="form-control" placeholder="Enter source names or ID numbers." aria-label="Source selection"></textarea>
<textarea id="sourceSelectionSelect" name="source_selection" class="form-control" placeholder="Enter source names or IDs." aria-label="Source selection"></textarea>
</div>
<div class="col">
<select id="sourceSelectionTypeSelect" name="source_selection_type" class="form-control" aria-label="Source selection type">
Expand Down
Loading
Loading