Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 0 additions & 31 deletions src/components/Analysis/ImageViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useAlertsStore } from '@/stores/alerts'
import { useAnalysisStore } from '@/stores/analysis'
import { loadImage, scalePoint } from '@/utils/common'
import WCS from '@/utils/wcs'
import VariableStarDialog from './VariableStarDialog.vue'

const props = defineProps({
catalog: {
Expand Down Expand Up @@ -38,8 +37,6 @@ const isHoveringLeaflet = ref(false)
const raDec = ref({ ra: 0, dec: 0 })
const alerts = useAlertsStore()
const analysisStore = useAnalysisStore()
const showVariableStarDialog = ref(false)
const variableTargetCoords = ref({ ra: null, dec: null })

onMounted(() => {
// Initialize the map and its event listeners before adding the image overlay
Expand Down Expand Up @@ -210,17 +207,7 @@ function createCatalogLayer(){
<b>Flux:</b> ${source.flux ?? 'N/A'}<br>
<b>RA:</b> ${source.ra ?? 'N/A'}<br>
<b>Dec:</b> ${source.dec ?? 'N/A'}<br>
<button class="variableAnalysisButton">Light Curve</button>
`

div.querySelector('button').addEventListener('click',() => {
showVariableStarDialog.value = true
variableTargetCoords.value = {
ra: source.ra,
dec: source.dec
}
})

// Create a circle marker for the source
return new L.Circle([source.y_win, source.x_win], {
color: 'var(--info)',
Expand Down Expand Up @@ -265,16 +252,6 @@ function createCatalogLayer(){
</v-chip>
</v-fade-transition>
</div>
<v-dialog
v-model="showVariableStarDialog"
width="600px"
>
<variable-star-dialog
:coords="variableTargetCoords"
@analysis-action="(action, input) => emit('analysisAction', action, input)"
@close-dialog="showVariableStarDialog = false"
/>
</v-dialog>
</template>
<style>
/* Custom icons for leaflet-geoman */
Expand Down Expand Up @@ -322,14 +299,6 @@ function createCatalogLayer(){
border-radius: 0.25rem;
}

.variableAnalysisButton {
background-color: var(--primary-interactive);
color: var(--text);
border: none;
padding: 0.5rem;
border-radius: 0.25rem;
cursor: pointer;
}
</style>
<style scoped>
</style>
17 changes: 9 additions & 8 deletions src/components/Analysis/LightCurvePlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function createChart() {
border: { color: text, width: 2 },
ticks: { color: text },
grid: { color: background, tickColor: text},
reverse: true
}
},
plugins: {
Expand All @@ -145,18 +146,20 @@ onMounted(() => {
</script>
<template>
<div class="wrapper">
<h4 class="title-lc">Light Curve</h4>
<div class="light-curve-plot-wrapper">
<canvas
ref="lightCurveCanvas"
class="light-curve-plot"
/>
<p class="title-lc">
Light Curve
<v-btn
icon="mdi-download"
class="download-btn"
title="Download as PNG"
@click="downloadChartAsPNG(lightCurveChart, 'light-curve.png', 'Light Curve')"
/>
</p>
<div class="light-curve-plot-wrapper">
<canvas
ref="lightCurveCanvas"
class="light-curve-plot"
/>
</div>
</div>
</template>
Expand All @@ -180,8 +183,6 @@ onMounted(() => {
height: 100% !important;
}
.download-btn {
margin-left: 1rem;
margin-bottom: 1rem;
align-self: flex-end;
}
</style>
24 changes: 11 additions & 13 deletions src/components/Analysis/PeriodogramPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const props = defineProps({

const canvasEl = ref(null)
let chart = null
const bestPeriod = ref(null)

// Build an array of {x,y} points from store (x = frequency, y = power)
function getXYPoints() {
Expand All @@ -43,12 +44,11 @@ function createChart() {
const background = style.getPropertyValue('--secondary-background')

const points = getXYPoints()
let selected = []
if (
props.periodogramData.peakIndex != null &&
points[props.periodogramData.peakIndex]
) {
selected = [points[props.periodogramData.peakIndex]]
bestPeriod.value = points[props.periodogramData.peakIndex]
}
if (!points.length) {
chart = new Chart(canvasEl.value, {
Expand Down Expand Up @@ -79,7 +79,7 @@ function createChart() {
},
{
label: 'Selected',
data: selected,
data: bestPeriod.value ? [bestPeriod.value] : [],
type: 'scatter',
pointBackgroundColor: secondary,
pointBorderColor: secondary,
Expand Down Expand Up @@ -170,7 +170,7 @@ function handlePointClick(freq, pow) {

if (!freq || Number.isNaN(freq) || freq <= 0) return
const period = 1.0 / freq
emit('periodSelected', period)
emit('periodSelected', period, freq, pow, bestPeriod.value)
}

watch(
Expand All @@ -186,20 +186,20 @@ onMounted(() => {

<template>
<div class="wrapper">
<h4 class="title-pd">
<p class="title-pd">
Periodogram
</h4>
<div class="periodogram-plot-wrapper">
<canvas
ref="canvasEl"
class="periodogram-plot"
/>
<v-btn
icon="mdi-download"
class="download-btn"
title="Download as PNG"
@click="downloadChartAsPNG(chart, 'periodogram-plot.png', 'Periodogram')"
/>
</p>
<div class="periodogram-plot-wrapper">
<canvas
ref="canvasEl"
class="periodogram-plot"
/>
</div>
</div>
</template>
Expand All @@ -223,8 +223,6 @@ onMounted(() => {
height: 100% !important;
}
.download-btn {
margin-left: 1rem;
margin-bottom: 1rem;
align-self: flex-end;
}
</style>
36 changes: 26 additions & 10 deletions src/components/Analysis/PhasedLightCurvePlot.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- eslint-disable vue/require-default-prop -->
<script setup>
import Chart from 'chart.js/auto'
import { ref, watch, computed, defineProps, onMounted } from 'vue'
Expand All @@ -11,9 +12,23 @@ const props = defineProps({
periodogramData: {
type: Object,
required: true
},
bestPeriod: {
type: Object,
required: false
},
selectedPoints: {
type: Array,
required: false
}
})

const bestPeriod = computed(() => props.bestPeriod)
const selectedPoints = computed(() => props.selectedPoints)

const sameValue = computed(() => (bestPeriod.value && selectedPoints.value.length > 0) ?
(bestPeriod.value.x === selectedPoints.value[0].x && bestPeriod.value.y === selectedPoints.value[0].y) : false)

const periodCanvas = ref(null)
let periodChart = null
const DECIMAL_PLACES = 4
Expand Down Expand Up @@ -132,25 +147,28 @@ onMounted(() => {
</script>
<template>
<div class="wrapper">
<h4 class="title-plc">
<p class="title-plc">
Phased Light Curve
</h4>
<div class="period-plot-wrapper">
<canvas
ref="periodCanvas"
class="period-plot"
/>
<v-btn
icon="mdi-download"
class="download-btn"
title="Download as PNG"
@click="downloadChartAsPNG(periodChart, 'period-plot.png', 'Phased Light Curve')"
/>
</p>
<div class="period-plot-wrapper">
<canvas
ref="periodCanvas"
class="period-plot"
/>
<div class="chip-row">
<v-chip color="var(--info)">
Period: {{ chartData.period }} days
</v-chip>
<v-chip :color="probabilityChipColor">
<v-chip
v-if="sameValue || !selectedPoints.length"
:color="probabilityChipColor"
>
False Alarm Probability: {{ chartData.falseAlarmPercentage }}%
</v-chip>
</div>
Expand All @@ -177,8 +195,6 @@ onMounted(() => {
height: 100% !important;
}
.download-btn {
margin-left: 1rem;
margin-bottom: 1rem;
align-self: flex-end;
}
.chip-row {
Expand Down
126 changes: 0 additions & 126 deletions src/components/Analysis/VariableStarDialog.vue

This file was deleted.

1 change: 0 additions & 1 deletion src/components/DataSession/Operation/OperationWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ function selectOperation(name) {
operationInputs.value[key] = value.default
}
else if (value.color_picker) {
console.log('value', value)
/**
* Custom handling for color image operation
* Since we can add and remove channels all inputs fall under the same key in an array of objects
Expand Down
Loading