Skip to content

Instantly share code, notes, and snippets.

@rickbassham
rickbassham / fit_to_tiff.py
Created February 11, 2018 19:00
Convert FIT to TIFF Python
from astropy.io import fits
from PIL import Image
import numpy
import sys
import os
filepath = 'test.fit'
@rickbassham
rickbassham / Test.java
Created August 19, 2019 14:51
mleap - Inconsistent schema using row transformer
package com.rickbassham.test;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import ml.combust.bundle.dsl.Bundle;
import ml.combust.mleap.core.types.StructField;
import ml.combust.mleap.core.types.StructType;
import ml.combust.mleap.runtime.MleapContext;
@rickbassham
rickbassham / capture.xml
Created May 1, 2020 22:29
Result of dbus introspect on Ekos Capture object
<node name="/KStars/Ekos/Capture">
<interface name="org.kde.kstars.Ekos.Capture">
<method name="start">
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"></annotation>
</method>
<method name="abort">
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"></annotation>
</method>
<method name="suspend">
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"></annotation>
PHD2 version 2.6.8 [Linux], Log version 2.5. Log enabled at 2020-06-02 20:54:22
Calibration Begins at 2020-06-02 21:24:48
Equipment Profile = CGX-AT8RC-OAG
Dither = both axes, Dither scale = 1.000, Image noise reduction = none, Guide-frame time lapse = 0, Server enabled
Pixel scale = 0.74 arc-sec/px, Binning = 1, Focal length = 1625 mm
Search region = 15 px, Star mass tolerance = 50.0%
Camera = INDI Camera [ZWO CCD ASI174MM Mini], full size = 1936 x 1216, no dark, no defect map, pixel size = 5.9 um
Exposure = 2000 ms
Mount = INDI Mount [Celestron CGX], Calibration Step = 150 ms, Calibration Distance = 25 px, Assume orthogonal axes = no
@rickbassham
rickbassham / README.md
Last active January 12, 2024 09:00
Step by Step Instructions to create an Open Source Astro-Imaging Computer

Instructions (works on amd64 and arm64)

A copy/paste guide to getting a full working astro-imaging computer running on Ubuntu 20.04 LTS. Installs latest stable versions of gpsd, KStars, INDI, OACapture, SkyChart, ASTAP, and Astrometry.net.

It uses the lightweight XFCE4 desktop, and allows you to VNC in, running everything locally on the astro-imaging pc.

Install Ubuntu Server 20.04.1

Raspberry Pi 4 Boot Ubuntu from USB SSD

This is a copy/paste guide to booting Ubuntu 20.04 from an SSD on a Raspberry Pi 4.

The majority of these commands came from this forum post: https://www.raspberrypi.org/forums/viewtopic.php?t=278791

Prep-work

This section only needs to be done the first time for a given Raspbery Pi 4. It flashes the EEPROM on the device to support booting from USB.

@rickbassham
rickbassham / Dockerfile
Created August 28, 2020 11:26
oacapture cross docker build
FROM --platform=arm64 ubuntu:20.04
ARG DEBIAN_FRONTEND="noninteractive"
ENV TZ=America/New_York
RUN mkdir /src
COPY . /src
WORKDIR /src
Process: kstars [16074]
Path: /Applications/KStars.app/Contents/MacOS/kstars
Identifier: ???
Version: 3.5.0 (3.5.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: kstars [16074]
User ID: 501
Date/Time: 2020-12-07 19:11:40.051 -0500
git remote rename origin upstream
git remote add origin https://github.com/user/FORK.git
git checkout -b newFeatureBranch

Whenever you need to update your fork based on the recent evolution of the original repo:

git checkout master
@rickbassham
rickbassham / analyze.txt
Created September 24, 2021 11:03
KStars 3.5.5 Alignment Issue
#KStars version 3.5.5. Analyze log version 1.0.
AnalyzeStartTime,2021-09-23 18:57:10.295,EDT
MountState,0.000,Idle
Temperature,1.265,22.010
MountCoords,1.283,215.8417,-42.3375,215.0164,-0.0089,1,50.9208
MountState,1.283,Parked
Temperature,603.315,21.450
Temperature,1204.794,21.080
Temperature,1806.255,20.570