diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b0f403cb..e7a21e626 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,16 @@ # Arbimon Release Notes -## v3.0.10 +## v3.0.10 - Feb XX, 2021 New features: -- ([CS-494](https://jira.rfcx.org/browse/CS-494)) Request spectrogram tiles from Media API for audios from RFCx streams +- CS-494 Request spectrogram tiles from Media API for audios from RFCx streams -## v3.0.9 - Feb 12, 2021 +Resolved issues: +- PI-545 Improve the quality of the spectrogram image +- PI-504 Can not filter more than one tag +- CS-474 Drop unique constraint on `projects` `name` column + +## v3.0.9 - Feb 15, 2021 New features: - PI-263 Admin can enable Audio-event-detection and Clustering pages diff --git a/app/model/recordings.js b/app/model/recordings.js index c033052e7..8a77e7feb 100644 --- a/app/model/recordings.js +++ b/app/model/recordings.js @@ -570,7 +570,8 @@ var Recordings = { audioTools.spectrogram(recording_path.path, cache_miss.file, { pixPerSec : config("spectrograms").spectrograms.pixPerSec, height : config("spectrograms").spectrograms.height, - ...recording.uri.endsWith('.opus') && recording.sample_rate && { maxfreq: recording.sample_rate * 2 } + ...recording.uri.endsWith('.opus') && recording.sample_rate && { maxfreq: recording.sample_rate * 2 }, + ...recording.contrast && { contrast: recording.contrast } },function(status_code){ if(status_code) { callback({code:status_code}); return; } cache_miss.retry_get(); @@ -590,6 +591,7 @@ var Recordings = { }, function(rec_info, next){ recording = rec_info; + recording.contrast = 105; Recordings.fetchSpectrogramFile(recording, next); }, function(specFile, next){ diff --git a/app/utils/audiotool.js b/app/utils/audiotool.js index e93831362..a56d6fbd4 100644 --- a/app/utils/audiotool.js +++ b/app/utils/audiotool.js @@ -163,6 +163,7 @@ var audiotools = { * of the audio file's duration. (default: 172) * @param {Integer} options.quantization number of colors gradations used in the spectrogram image. * (default: 249, the maximum) + * @param {Integer} options.contrast the ‘contrast’ of the spectrogram display. * @param {String} options.window windowing function used to compute the spectrogram. * (One of 'Hann', 'Hamming', 'Bartlett', 'Rectangular', 'Kaiser', default: 'Hann') * @param {Function} callback callback function. @@ -192,7 +193,9 @@ var audiotools = { args.push( '-q', ((options.quantization | 0) || 249) // color quantization ); - + if(options.contrast) { + args.push('-z', options.contrast); + } if(options.window && ['Hann', 'Hamming', 'Bartlett', 'Rectangular', 'Kaiser'].indexOf(options.window) >= 0) { args.push('-w', options.window); // just the raw spectrogram image } diff --git a/assets/app/app/analysis/patternmatching/index.js b/assets/app/app/analysis/patternmatching/index.js index 5ac1f7139..691331108 100644 --- a/assets/app/app/analysis/patternmatching/index.js +++ b/assets/app/app/analysis/patternmatching/index.js @@ -171,14 +171,14 @@ angular.module('a2.analysis.patternmatching', [ { class:'fa fa-th', value:'is-small'}, ], search: [ - {value:'all', text:'All', description: 'Show all matched rois.'}, - {value:'present', text:'Present', description: 'Show all rois marked as present.'}, - {value:'not_present', text:'Not Present', description: 'Show all rois marked as not present.'}, - {value:'unvalidated', text:'Unvalidated', description: 'Show all rois without validation.'}, + {value:'all', text:'All', description: 'Show all matched Region of Interest.'}, + {value:'present', text:'Present', description: 'Show all Region of Interest marked as present.'}, + {value:'not_present', text:'Not Present', description: 'Show all Region of Interest marked as not present.'}, + {value:'unvalidated', text:'Unvalidated', description: 'Show all Region of Interest without validation.'}, {value:'best_per_site', text:'Best per Site', description: 'Show the best scored roi per site.'}, {value:'best_per_site_day', text:'Best per Site, Day', description: 'Show the best scored roi per site and day.'}, - {value:'by_score', text:'Score', description: 'Show all rois ranked by score.'}, - {value:'by_score_per_site', text:'Score per Site', description: 'Show all rois ranked by score per site.'}, + {value:'by_score', text:'Score', description: 'Show all Region of Interest ranked by score.'}, + {value:'by_score_per_site', text:'Score per Site', description: 'Show all Region of Interest ranked by score per site.'}, ], selection: [ {value:'all', text:'All'}, diff --git a/assets/app/app/audiodata/recordings/filter-parameters.js b/assets/app/app/audiodata/recordings/filter-parameters.js index f954b4b44..3e699caf1 100644 --- a/assets/app/app/audiodata/recordings/filter-parameters.js +++ b/assets/app/app/audiodata/recordings/filter-parameters.js @@ -20,7 +20,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ requires:'^RecsCtrl', link: function(scope, element, attrs) { var controller = scope.controller; - + scope.applyFilters = function() { scope.onApplyFilters({filters: controller.getFilters()}); }; @@ -55,12 +55,12 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ return _1.length !== undefined && _1.map(mapFn); }; } - + var _1_get_value_mapper = _1_mapper(_1_get("value")); var _1_get_id_mapper = _1_mapper(_1_get("id")); var _1_get_tag_id_mapper = _1_mapper(_1_get("tag_id")); var _1_get_flags_mapper = _1_mapper(_1_get("flags")); - + var findObjectWith = function(arr, key, value) { var result = arr.filter(function(obj) { return obj[key] === value; @@ -96,7 +96,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ soundscape_composition_annotation : ['present', 'absent'], }; this.params={}; - + var filterDefs = [ {name:"range" , map: function set_range_bounds(range){ if(range && range.from && range.to) { @@ -123,7 +123,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ this.getFilters = function() { var filters = {}; var params = this.params; - + filterDefs.forEach(function(filterDef){ var param = params[filterDef.name]; var value = (param && filterDef.map) ? filterDef.map(param) : param; @@ -131,7 +131,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ filters[filterDef.name] = value; } }); - + return filters; }; @@ -139,7 +139,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ if(filters === undefined){ filters = {}; } - + var options = this.options; Project.getSites().then(function(sites){ return $q.all(sites.map(function(site){ @@ -157,13 +157,13 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ days: [], // daysList hours: [], // hoursList }; - + var levelIds = Object.keys(lists); - + var getFilterOptions = function(filters, obj, level) { var count = 0; var currentLevel = levelIds[level]; - + for(var child in obj) { if( Object.keys(filters).length && @@ -172,35 +172,35 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ ) { // skip if filter is define and the value is not in it continue; } - + var item = findObjectWith(lists[currentLevel], 'value', child); - + if(!item) { item = { value: child, count: 0 }; lists[currentLevel].push(item); } - + var itemCount; if(typeof obj[child] == 'number') { itemCount = obj[child]; } else { if(level === 0) count = 0; - + itemCount = getFilterOptions(filters, obj[child], level+1); } - + item.count += itemCount; count += itemCount; } - + return count; }; getFilterOptions(filters, data, 0); - + options.sites = lists.sites; options.years = lists.years; - + options.months = lists.months.map(function(month) { month.value = parseInt(month.value); month.value--; @@ -210,12 +210,12 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ count: month.count }; }); - + options.days = lists.days.map(function(day) { day.value = parseInt(day.value); return day; }); - + options.hours = lists.hours.map(function(hour) { hour.value = parseInt(hour.value); return { @@ -224,11 +224,11 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ count: hour.count }; }); - + var sort = function(a, b) { return a.value > b.value; }; - + options.sites.sort(sort); options.years.sort(sort); options.months.sort(sort); @@ -254,12 +254,11 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ if (!tagsObj[key]) { tagsObj[key] = { tag: key, - tag_id: [t.tag_id], + tag_id: t.tag_id, count: t.count } } else { - tagsObj[key].tag_id.push(t.tag_id); tagsObj[key].count++ } }) @@ -277,7 +276,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ options.soundscape_composition = classes; }).bind(this)); }; - + this.computeClassificationResultsOptions = function(classifications){ console.log("this.computeClassificationResults = function(classifications){", classifications); var haveThreshold = classifications && classifications.reduce(function(a, b){ diff --git a/assets/app/orders/change-plan.html b/assets/app/orders/change-plan.html index cb1eded80..1743d8b94 100644 --- a/assets/app/orders/change-plan.html +++ b/assets/app/orders/change-plan.html @@ -44,7 +44,7 @@
+
Please contact us at support@rfcx.org if you have any questions or concerns.
diff --git a/scripts/db/000-base-tables.sql b/scripts/db/000-base-tables.sql index 008321343..126f450f9 100644 --- a/scripts/db/000-base-tables.sql +++ b/scripts/db/000-base-tables.sql @@ -1217,7 +1217,6 @@ CREATE TABLE `projects` ( `citizen_scientist_enabled` tinyint(1) NOT NULL DEFAULT '0', `cnn_enabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`project_id`), - UNIQUE KEY `name` (`name`), UNIQUE KEY `url` (`url`), KEY `project_type_id` (`project_type_id`), KEY `current_plan` (`current_plan`),