Electronically Assisted Astronomy with a Jetson Nano

My mistake for Windows setup :

You will also need to install ZWO camera driver. You will find it here :

From what i can remember, Electronic Filter Wheel doesn’t need a specific driver to work.

That’s all.

Alain

1 Like

Hello,

i am back. Many work at my job, some holidays (2 weeks in Japan, really great) and now, i wait for storm Ciaran to arrive here, in French Brittany. Waiting for it, i made some small debugs in JetsonSky (new V40_26RC version).

I wait for a new lens : 7artisans 35mm F0,95. I hope it will be great and i also hope bad weather will end soon (i was not able to make test on Jupiter with this horrible weather).

I will also try to get soon a new laptop with a faster CPU (i7-1300H or i9-13980HX) and a better GPU (probably a RTX480). Huge investment but i hope it will be useful for a while.

Well, that’s all for news.

Clear skies.

Alain

Hello,

i have just received my new laptop and i made some quick install of JetsonSky on it. Everything seems to work fine except Pytorch but it is not a problem. I also did not take time to compile opencv with Cuda and GStreamer. I will do this later.

Ok, it is Windows laptop and not Jetson SBC. I still have the Jetson Xavier NX and the AGX Orin and i will continue to use it.

So, the laptop is a beast : i9-13980HX, 32 GB memory, RTX 4080.

JetsonSky is MUCH faster with this new laptop. Considering the price, i would have been a bit disappointed if the performances were not so good !

With this extra power, i will be able to get much higher frame rate for planetary capture with live treatments. My only problem now is the weather. I have never seen so much rain in my life. Just have to wait for clear sky.

That’s all for now.

Alain

Hello,

i have released a new version of JetsonSky : V41_01RC. It’s a beta version.

I removed some bugs and now, the main windows is larger if you have a 1440p, 166p or 4K screen.

If you have a FullHD screen, the size of the main window remains unchanged.

That’s all.

Alain

Hello,

i have received a new lens : 7Artisans 35mm F0.95 lens with Sony E mount adapter.

As usual, when you receive new equipment, the weather is bad. Quite normal.

Here is the beast :




Alain

A small comparison between my new 7Artisans 35mm F0.95 lens and my old Canon FD 50mm F1.4 lens :


From F1.4 to F0.95 allows exposure time to be divided by a factor 2.
If i do not want to low exposure time, i will get lower gain, meaning lower noise.

Depending of my target, lower exposure time or lower gain are really interesting. It’s quite cool.

PS : i will release a new JetsonSky version in a minute because i had a dirty bug with pictures capture in the V41_01RC version. New version will be V41_02RC. Sorry for that.

Alain

Hello,

yesterday, a small miracle : no clouds in the sky.

First, i wanted to test the 7Artisans 35mm F0.95 lens but when i saw Jupiter, i decided to use my Celestron C9.25 telescope.

The setup :

  • Celestron C9.25 2350mm focal length
  • a barlow 1.6x (the focal length is now 3760mm)
  • ADC to correct the atmospheric dispersion
  • an ASI485MC camera

I decided to use Firecapture to make acquisitions (To be sure i will get as frames as possible for the videos ; maybe it will be the last night without clouds for this year).

Classical treatment is :

  • acquisition (RAW video)
  • frame stacking with Autostakkert 3
  • treatment with Registax 6

Enhance treatment is :

  • acquisition (RAW video)
  • RAW video treatment with JetsonSky
  • frame stacking with Autostakkert 3
  • treatment with Registax 6

Here is the comparison :


I will have to add a video stabilization in JetsonSky in order to use AADF noise removal filter with good results (in order to sharpen the video). For now, i must use a post treatment software (PIPP) to stabilize Jupiter. Even if my mount is not so bad (Sirius EQ mount), there are always small vibrations during acquisition.

I guess this will be my first and last Jupiter for 2023 !

Have a nice day.

Alain

PS : a slightly better version of Jupiter is :

Hello,

i have uploaded a new version of JetsonSky. V41_03RC.

Alain

Hello,

today, some heavy work to install JetPack 6.0 DP with the Jetson AGX Orin !

So :

  • Jetpack 6 is OK and it works fine
  • software environment for JetsonSky is OK (Cupy, etc.)
  • Pytorch 2.2 is installed and is OK
  • i have downloaded and compiled TorchVision 0.17.0 : it’s OK

AGX Orin compiling TorchVision :


That’s great.

Alain

As JP 6.0 comes with OpenCV without CUDA, i had to compile OpenCV.

The AGX Orin working :


i uses @mdegans script to compile OpenCV but i had to make some small changes in the script :

#!/usr/bin/env bash
# 2019 Michael de Gans

set -e

# change default constants here:
readonly PREFIX=/usr/local  # install prefix, (can be ~/.local for a user install)
readonly DEFAULT_VERSION=4.8.0  # controls the default version (gets reset by the first argument)
readonly CPUS=$(nproc)  # controls the number of jobs

# better board detection. if it has 6 or more cpus, it probably has a ton of ram too
if [[ $CPUS -gt 5 ]]; then
    # something with a ton of ram
    JOBS=$CPUS
else
    JOBS=1  # you can set this to 4 if you have a swap file
    # otherwise a Nano will choke towards the end of the build
fi

cleanup () {
# https://stackoverflow.com/questions/226703/how-do-i-prompt-for-yes-no-cancel-input-in-a-linux-shell-script
    while true ; do
        echo "Do you wish to remove temporary build files in /tmp/build_opencv ? "
        if ! [[ "$1" -eq "--test-warning" ]] ; then
            echo "(Doing so may make running tests on the build later impossible)"
        fi
        read -p "Y/N " yn
        case ${yn} in
            [Yy]* ) rm -rf /tmp/build_opencv ; break;;
            [Nn]* ) exit ;;
            * ) echo "Please answer yes or no." ;;
        esac
    done
}

setup () {
    cd /tmp
    if [[ -d "build_opencv" ]] ; then
        echo "It appears an existing build exists in /tmp/build_opencv"
        cleanup
    fi
    mkdir build_opencv
    cd build_opencv
}

git_source () {
    echo "Getting version '$1' of OpenCV"
    git clone --depth 1 --branch "$1" https://github.com/opencv/opencv.git
    git clone --depth 1 --branch "$1" https://github.com/opencv/opencv_contrib.git
}

install_dependencies () {
    # open-cv has a lot of dependencies, but most can be found in the default
    # package repository or should already be installed (eg. CUDA).
    echo "Installing build dependencies."
    sudo apt-get update
    sudo apt-get dist-upgrade -y --autoremove
    sudo apt-get install -y \
        build-essential \
        cmake \
        git \
        gfortran \
        libatlas-base-dev \
        libavcodec-dev \
        libavformat-dev \
        libswresample-dev \
        libcanberra-gtk3-module \
        libdc1394-dev \
        libeigen3-dev \
        libglew-dev \
        libgstreamer-plugins-base1.0-dev \
        libgstreamer-plugins-good1.0-dev \
        libgstreamer1.0-dev \
        libgtk-3-dev \
        libjpeg-dev \
        libjpeg8-dev \
        libjpeg-turbo8-dev \
        liblapack-dev \
        liblapacke-dev \
        libopenblas-dev \
        libpng-dev \
        libpostproc-dev \
        libswscale-dev \
        libtbb-dev \
        libtbb2 \
        libtesseract-dev \
        libtiff-dev \
        libv4l-dev \
        libxine2-dev \
        libxvidcore-dev \
        libx264-dev \
        pkg-config \
        python3-dev \
        python3-numpy \
        python3-matplotlib \
        qv4l2 \
        v4l-utils \
        zlib1g-dev
}

configure () {
    local CMAKEFLAGS="
        -D BUILD_EXAMPLES=OFF
        -D BUILD_opencv_python2=OFF
        -D BUILD_opencv_python3=ON
        -D CMAKE_BUILD_TYPE=RELEASE
        -D CMAKE_INSTALL_PREFIX=${PREFIX}
        -D CUDA_ARCH_BIN=**8.7**
        -D CUDA_ARCH_PTX=
        -D CUDA_FAST_MATH=ON
        -D CUDNN_VERSION='8.9.4'
        -D EIGEN_INCLUDE_PATH=/usr/include/eigen3 
        -D ENABLE_NEON=ON
        -D OPENCV_DNN_CUDA=OFF
        -D OPENCV_ENABLE_NONFREE=ON
        -D OPENCV_EXTRA_MODULES_PATH=/tmp/build_opencv/opencv_contrib/modules
        -D OPENCV_GENERATE_PKGCONFIG=ON
        -D WITH_CUBLAS=ON
        -D WITH_CUDA=ON
        -D WITH_CUDNN=ON
        -D WITH_GSTREAMER=ON
        -D WITH_LIBV4L=ON
        -D WITH_OPENGL=ON"

    if [[ "$1" != "test" ]] ; then
        CMAKEFLAGS="
        ${CMAKEFLAGS}
        -D BUILD_PERF_TESTS=OFF
        -D BUILD_TESTS=OFF"
    fi

    echo "cmake flags: ${CMAKEFLAGS}"

    cd opencv
    mkdir build
    cd build
    cmake ${CMAKEFLAGS} .. 2>&1 | tee -a configure.log
}

main () {

    local VER=${DEFAULT_VERSION}

    # parse arguments
    if [[ "$#" -gt 0 ]] ; then
        VER="$1"  # override the version
    fi

    if [[ "$#" -gt 1 ]] && [[ "$2" == "test" ]] ; then
        DO_TEST=1
    fi

    # prepare for the build:
    setup
    install_dependencies
    git_source ${VER}

    if [[ ${DO_TEST} ]] ; then
        configure test
    else
        configure
    fi

    # start the build
    make -j${JOBS} 2>&1 | tee -a build.log

    if [[ ${DO_TEST} ]] ; then
        make test 2>&1 | tee -a test.log
    fi

    # avoid a sudo make install (and root owned files in ~) if $PREFIX is writable
    if [[ -w ${PREFIX} ]] ; then
        make install 2>&1 | tee -a install.log
    else
        sudo make install 2>&1 | tee -a install.log
    fi

    cleanup --test-warning

}

main "$@"

Select the OpenCV version you want to use. I selected this one :
DEFAULT_VERSION=4.8.0

libavresample-dev must be replaced with libswresample-dev

libdc1394-22-dev must be replaced with libdc1394-dev

You will have to select the appropriate Cuda architecture. For Orin, it is 8.7. Select the good architecture for you Jetson

I had to disable OPENCV_DNN_CUDA flag because i had an error when compiling with it. I don’t know why.

I am not sure of the CUDNN_VERSION (i uses 8.9.4).

Now, JetsonSky works fine with OpenCV & Cuda.

That’s all.

Alain

Hello,

i have just made my first test of the 7Artisans 35mm F0.95 lens on the deep sky. Clouds are gone and it was a good opportunity to make a test (clouds will be back very soon).

As my camera does not filter IR, the lens is unusable at day light. Fortunately, it is usable at night with deep sky and the result is really good.

I decided to use Jetson AGX Orin to control the camera and perform live treatments. It was also to test JetPack 6.0. Everything is fine and works perfectly.

The video :

I am very happy with the lens. A good choice.

We can see more and more satellites over our heads. Mainly Starlink satellites. And it’s only the beginning. This will be a serious problem for astronomy.

Alain

The satellites tracking version of the first part of the video :

Alain

As @Honey_Patouceul suggested to me, satellites could be removed from the video.

Here is a first try. Not really good but not really bad.

Alain

1 Like

I suppose you might need a better angular resolution, but it seems like the satellite removal could be tuned to also detect the wobble of stars. It’s all change, although a different characteristic. The reason I thought of that is the antenna (UHF television?). The antenna probably has a pendulum movement from wind and perhaps trucks driving by vibrating it. It has a resonant frequency. It would be cool if the movement filter could be generalized to different kinds of resonance.

Hi linuxdev,

i would in that case effectively a better angular resolution ! Interesting but a bit hard to realize.

I tried something more easy. As i am on holidays and sick (damned !), i get some time to make useless things with JetsonSky.

The exercise is to reconstruct the image considering the stars and satellites detection. I tried to preserve stars color, brightness and size ;

I guess it works. Not spectacular but the images are reconstructed !

Now i will have a little rest because i got cold and a bit tired.

Alain

The antenna in the reconstructed was fascinating. You could see particular points and movement with the bright spots. You can almost see the wave of movement bouncing through the antenna.

Yes, it’s really interesting. Very small changes in the antenna position are magnified with the spots.

I would bet that this could be expanded to finding rotation in asymmetric objects, and determine the frequencies (I assume it is a sum of multiple resonant frequencies due to being multiple smaller linear elements on the antenna) a given object is resonant at. There are probably examples in astronomy where it’d be useful to use that for examining motion like that.

1 Like

Hello,

Merry Christmas to everyone !

Special wishes to @dusty_nv : Hi Dustin ! Merry Christmas to you and your family !

I also wish the best to @linuxdev , @Honey_Patouceul , @Thommy78 , @mdegans and all the peaople who follow me for years !

To not forget the past, one of my first “colored Moon” from 2014 :


And a better version :


Results always need hard work !

Clear sky.

Alain

2 Likes

Thanks Alain, wish you all the best for next year and beyond.