Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagohm committed Jul 26, 2023
2 parents 24dbc82 + e30adfc commit c214c5a
Show file tree
Hide file tree
Showing 40 changed files with 1,527 additions and 1,047 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ updates:
schedule:
interval: "weekly"
day: "friday"
open-pull-requests-limit: 16
target-branch: "dev"

- package-ecosystem: "npm"
directory: "/desktop"
schedule:
interval: "weekly"
day: "friday"
open-pull-requests-limit: 64
target-branch: "dev"

- package-ecosystem: "npm"
directory: "/desktop/app"
schedule:
interval: "weekly"
day: "friday"
Expand Down
6 changes: 3 additions & 3 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import org.springframework.boot.gradle.tasks.bundling.BootJar

plugins {
kotlin("jvm")
id("org.springframework.boot") version "3.1.1"
id("io.spring.dependency-management") version "1.1.0"
id("org.springframework.boot") version "3.1.2"
id("io.spring.dependency-management") version "1.1.2"
kotlin("plugin.spring")
kotlin("kapt")
id("io.objectbox")
Expand Down Expand Up @@ -37,7 +37,7 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-websocket")
kapt("org.springframework:spring-context-indexer:6.0.10")
kapt("org.springframework:spring-context-indexer:6.0.11")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
testImplementation(project(":nebulosa-skycatalog-hyg"))
Expand Down
11 changes: 5 additions & 6 deletions api/src/main/kotlin/nebulosa/api/services/CameraExposureTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import nebulosa.common.concurrency.CountUpDownLatch
import nebulosa.common.concurrency.ThreadedJob
import nebulosa.fits.FITS_DEC_ANGLE_FORMATTER
import nebulosa.fits.FITS_RA_ANGLE_FORMATTER
import nebulosa.fits.FitsKeywords
import nebulosa.fits.naxis
import nebulosa.imaging.Image
import nebulosa.indi.device.camera.*
Expand All @@ -16,8 +17,6 @@ import nebulosa.indi.device.mount.Mount
import nebulosa.log.loggerFor
import nom.tam.fits.Fits
import nom.tam.fits.ImageHDU
import nom.tam.fits.header.ObservationDescription
import nom.tam.fits.header.extra.SBFitsExt
import nom.tam.util.FitsOutputStream
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
Expand Down Expand Up @@ -193,10 +192,10 @@ data class CameraExposureTask(
val raStr = mount.rightAscensionJ2000.format(FITS_RA_ANGLE_FORMATTER)
val decStr = mount.declinationJ2000.format(FITS_DEC_ANGLE_FORMATTER)

it.addValue(ObservationDescription.RA, raStr)
it.addValue(SBFitsExt.OBJCTRA, raStr)
it.addValue(ObservationDescription.DEC, decStr)
it.addValue(SBFitsExt.OBJCTDEC, decStr)
it.addValue(FitsKeywords.RA, raStr)
it.addValue(FitsKeywords.OBJCTRA, raStr)
it.addValue(FitsKeywords.DEC, decStr)
it.addValue(FitsKeywords.OBJCTDEC, decStr)
}

path.parent.createDirectories()
Expand Down
12 changes: 5 additions & 7 deletions api/src/main/kotlin/nebulosa/api/services/FramingService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ package nebulosa.api.services
import nebulosa.api.data.enums.HipsSurveyType
import nebulosa.fits.FITS_DEC_ANGLE_FORMATTER
import nebulosa.fits.FITS_RA_ANGLE_FORMATTER
import nebulosa.fits.FitsKeywords
import nebulosa.hips2fits.FormatOutputType
import nebulosa.hips2fits.Hips2FitsService
import nebulosa.imaging.Image
import nebulosa.math.Angle
import nebulosa.platesolving.Calibration
import nom.tam.fits.header.ObservationDescription
import nom.tam.fits.header.Standard
import nom.tam.fits.header.extra.MaxImDLExt
import org.springframework.stereotype.Service
import java.io.ByteArrayInputStream
import kotlin.math.max
Expand All @@ -33,10 +31,10 @@ class FramingService(private val hips2FitsService: Hips2FitsService) {

val image = Image.open(ByteArrayInputStream(data))

image.header.addValue(Standard.INSTRUME, hipsSurveyType.hipsSurvey.id)
image.header.addValue(ObservationDescription.RA, rightAscension.format(FITS_RA_ANGLE_FORMATTER))
image.header.addValue(ObservationDescription.DEC, declination.format(FITS_DEC_ANGLE_FORMATTER))
image.header.addValue(MaxImDLExt.ROTATANG, rotation.degrees)
image.header.addValue(FitsKeywords.INSTRUME, hipsSurveyType.hipsSurvey.id)
image.header.addValue(FitsKeywords.RA, rightAscension.format(FITS_RA_ANGLE_FORMATTER))
image.header.addValue(FitsKeywords.DEC, declination.format(FITS_DEC_ANGLE_FORMATTER))
image.header.addValue(FitsKeywords.ROTATANG, rotation.degrees)
image.header.addValue("COMMENT", null as String?, "Made use of hips2fits, a service provided by CDS.")

val crot = -rotation + Angle.SEMICIRCLE
Expand Down
3 changes: 1 addition & 2 deletions desktop/app/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Client } from '@stomp/stompjs'
import { app, BrowserWindow, dialog, ipcMain, Menu, screen, shell } from 'electron'
import Hex from 'hex-encoding'
import { ChildProcessWithoutNullStreams, spawn } from 'node:child_process'
import * as path from 'path'
import { INDIEventName, OpenWindow } from '../src/shared/types'
Expand Down Expand Up @@ -91,7 +90,7 @@ function createWindow(data: OpenWindow<any>) {

const resizable = data.resizable ?? false
const icon = data.icon ?? 'nebulosa'
const params = Hex.encodeStr(JSON.stringify(data.params || {}))
const params = encodeURIComponent(JSON.stringify(data.params || {}))

const window = new BrowserWindow({
x: size.width / 2 - width / 2,
Expand Down
14 changes: 0 additions & 14 deletions desktop/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion desktop/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"private": true,
"dependencies": {
"@stomp/stompjs": "7.0.0",
"hex-encoding": "1.0.0",
"ws": "8.13.0"
}
}
Loading

0 comments on commit c214c5a

Please sign in to comment.