2016年11月17日 星期四

DSLR control and dither

這是 gphoto2 和 Lin guider dither 腳本檔 (shell script) 的正式版, 此 script 是針對 Nikon D5300, D600 和 D810A 和我所建立的 AstroEx 寫成的, 但相信能夠支援 D600 以後的新型號 (3xxx 除外), 謝謝聰奇兄 Tsung-Chi Wu 代為測試 D800E 和 D7200 並且能通過測試。

*此程式的設計使 dither 的數量可以因應相片的數目而設定, 優點是當拍攝的數量很多時 (超過30張), 可以不需花大量時間於每張相片之間作 dither 和 settle 赤道儀的震動,只要有適量的 dither frames , 疊相時配合 sigma clip 便能有效地移除 hot / cold pixel 。

Canon 600D 用家可以嘗試將 sudo gphoto2 -B $exptime --capture-image-and-download --keep-raw --frames 1;

換成

sudo gphoto2 --set-config eosremoterelease=Immediate --wait-event=$exptime\s --capture-image-and-download --set-config eosremoterelease=Off --wait-event-and-download=2s --keep-raw;


腳本檔 (shell script): https://github.com/QK-sampson/astroCap/blob/master/astrocap.sh


使用說明


1. 使用該 script program 前需要將 DSLR 設定手動模式和 jpg + raw 。

2. 此程式可以透過互動方法輸入攝影參數, 或直接將參數加於程式指令後方然後輸入。

3. Dither 數目和 Settle time 輸入 enter 或 0 代表不 dither, 只作連續曝光。

4. 程式運作時, 於 “astrophoto” 資料夾下會自動建立 “target name” 資料夾, 每影完一張相, jpg 會即時下載到該資料夾中, 以便用照片程式開啟 (或透過手機瀏覽器下載照片)作即時鑑控, DSLR 只保留 RAW。

5. 此程式第一部分為 capture preview 功能, 預設為開啟 。 當 capture preview 功能開啟時, 第一張曝光相片需要獨立輸入曝光時間 (預設 10 秒)和 iso (預設 25600), 當曝光完成後, jpg (檔案名稱附有拍攝時間) 會即時下載到 astrophoto folder 和使用 GPicView 自動開啟。

6. 請自行設定 Lin guider 的 dither 參數。


Video demo

1. Raspberry pi3 遙控 D5300 影相。先用高 iso 拍一張以確認深空目標和構圖, 然後連續拍攝。RAW 保留在 DSLR , jpeg 下載到 raspberry pi3 作隨時監控星點情況。

https://youtu.be/8n-jYgBd4Iw


2. Raspberry pi3 遙控 D5300 連拍及 dithering (beta version)。

https://youtu.be/fl1WJtd3hvM


如現正使用我所預製的 pi3 image (AstroEx v.1)的同好, 請先新增 /home/raspex/astrophoto 資料夾。


程式限制

Estimated total time 只是約數供大家參考。

大多數情況下, 最後一次 dither 指令,設定於最後一次曝光的相片前發出。

長長長遠目標 (如有空間時間)

同時間控制兩台或多台 DSLR

支援 DSLR “mirror lock up” 功能

加入 Capture and solve 功能作即時離線 plate solving

加入 Auto guiding “方形路程” 的移動方式

2016年9月8日 星期四

如何使用 Raspberry pi3 設置無線遙控自動導星

本人年多前開始學習自動導星, 但又不想花數千元購入手提電腦, 為的只是自動導星, 更何況還需花錢購買導星鏡和 ccd, 最重要的原因是我無能力帶多部手提電腦和後備電源, 因為我不是自駕人士,每次攝星都要帶十幾二十 kg 的設備,又拉車又背囊去到郊區地方, 於是開始從外國網站上學習怎樣安裝和使用 Raspberry pi 作自動導星, 經過多次嘗試和學習, 現在總算有少許成果, 可以實現遙控自動導星、遙控 DSLR (Nikon D600, D5300, D810A) 和配合導星軟件作 Dithering , 希望在此分享給有興趣的同好, 提供多一個自動導星的方案。
使用 Raspberry pi3 微型電腦進行自動導星有以下優點:
  • 不到 100g 的重量以及外型輕巧, 可使用魔術貼將它貼於脚架或赤道儀不同地方,以遷就電線排列和 RA 的移動 。
  • 只需一顆小型 5v 行動電源就能運作超過一晚。
  • 可透過智能手機或平板電腦無線搖控。
  • 可額外安裝 gphoto2 遙控 DSRL 作自動曝光和配合 Lin guider 導星軟件作 Dithering。(待續 : 如何實現 DSLR control 和 Dithering: DIY Beta program for Nikon DSLR)
  • 額外安裝 ser2net 後可使用 SkySafari Plus / Pro 遙控赤道儀或作自動導入 goto system (本人使用人肉 go-to mount , 無法測試)
由於本人不是電腦專材, 安裝方法只是參考不同的網站, 請自行衡量風險。此方案採用 Linux 系統和 Lin guider 自動導星軟件, 與 phd2 有所不同, 因此讀者務必自行參考 Lin guider 所能支援的 CCD / CMOS camera 以及其相關的設定。

Lin guider: Auto guide
phd2: Auto guide
gphoto2: DSLR control -> http://gphoto.sourceforge.net/
kstars: Star map -> https://edu.kde.org/kstars/
digiKam: Photo management -> https://www.digikam.org/
OpenSkyImager -> https://github.com/OpenSkyProject/OpenSkyImager
ddserver: Controlling Nikon and Canon DSLR using qDslrDashboard -> http://dslrdashboard.info/
Astrometry: Plate solve -> http://astrometry.net/doc/readme.html

黑色和白色分別是 Raspberry pi2 和 pi3:
 
銀色的是行動電源:

  1. Raspberry pi3
  2. 16GB Class 10 Micro SD 咭
  3. 導星鏡 (120mm mini guide scope)
  4. 導星用的 CCD / CMOS (QHY5L-II mono)
  5. 5V 行動電源
必要軟件 :
  1. Raspbian : 電腦系統 (OS)
  2. Lin guider : 自動導星軟件
  3. x11vnc, hostapd, dnsmasq : 用作搖距控制
非必要軟件 :
  1. gphoto2 : 用作搖控 DSLR 取代快門線。
  2. ser2net : 可使用 SkySafari Plus / Pro 遙控赤道儀或作自動導入 (goto system)
系統安裝方法:
  • Raspberry pi3 系統安裝 : 下載 Raspbian 映像檔案並利用 Win32DiskImage 燒錄到 Micro SD 咭便完成。
自動導星軟件的安裝方法:
開啟 Raspberry pi3 後並連接到互聯網, 再開啟 terminal 續行輸入以下指令, 有#號項除外(#號項是注解和提示如何修改檔案, 請不要輸入) :
sudo apt-get update
sudo apt-get upgrade

### Access point set up ###
# ssid = Wi-Fi 訊號名稱
# wpa_passphrase =  Wi-Fi 密碼

sudo apt-get install dnsmasq hostapd
sudo nano /etc/hostapd/ap.conf
# Add content.
interface=wlan0
hw_mode=g
channel=10
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wpa_passphrase=raspberry
ssid=Raspi3_guiding
# Save and exit

# edit dnsmasq.conf
sudo nano /etc/dnsmasq.conf
# Add content
interface=wlan0
dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h
# Save and exit

# edit rc.local
sudo nano /etc/rc.local
# Delete all content and add
sudo ifconfig wlan0 down
sudo ifconfig wlan0 10.0.0.1 netmask 255.255.255.0 up
sudo iwconfig wlan0 power off
sudo service dnsmasq restart
sudo hostapd -B /etc/hostapd/ap.conf & > /dev/null 2>&1
# Save and exit

# Compile/Install LinGuider
################################################
wget http://ncu.dl.sourceforge.net/project/linguider/4.0.0/lin_guider-4.0.0.tar.bz2
wget http://tenet.dl.sourceforge.net/project/cccd/firmware/firmware-ccd_1.3_all.deb
sudo dpkg -i firmware-ccd_1.3_all.deb

sudo tar -xvf lin_guider-4.0.0.tar.bz2
cd lin_guider_pack/io_ftdi/
sudo apt-get install libftdi-dev g++
sudo ./build.sh

cd /home/pi/lin_guider_pack/lin_guider/
sudo apt-get install fxload libusb-dev libqt4-dev libusb-1.0
./configure
make
sudo cp ./lin_guider /usr/local/bin/

# Create a Launcher on the desktop that runs /usr/local/bin/lin_guider
sudo ln -s /usr/local/bin/lin_guider /home/raspex/Desktop/LinGuider

# Install x11vnc
################################################
sudo apt-get install x11vnc
x11vnc -forever -display :0

#x11vnc auto start up on boot
cd /home/pi/.config
sudo mkdir autostart
cd autostart
sudo nano x11vnc.desktop

### Paste the following text into the file #####
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -display :0
StartupNotify=false
Terminal=false
Hidden=false
################################################

## Save and exit
完成以上步驟後 logout 並重啟 Raspberry pi3 便完成。重啟後使用手機、平板或電腦查看並連接 Raspberry pi3 所發出的WiFi 訊號,成功連線後便可以使用 vnc 軟件遙控使用 Raspberry pi3, 以我經驗, 十米八米範圍來都不會斷線。

器材設置圖片:
80mm main scope and a mini guide scope
 
 
 
DSLR and Raspberry pi2

Raspberry pi2 and Lithium battery


Lin guider
 
 
Software reference:
  • Raspbian (https://www.raspberrypi.org/downloads/)
  • Lin guider (https://sourceforge.net/projects/linguider/)
  • Win32DiskImage (https://sourceforge.net/projects/win32diskimager/)
  • gphoto2  (http://gphoto.org/doc/remote/)
  • ser2net (http://astroland.funxiun.com/remote-control-your-goto-telescope-mount-using-a-raspberry-pi-and-skysafari/)
  • http://morepootling.blogspot.hk/2016/03/telescope-with-raspberry-pi.html
  • http://www.brahmand.me/astropi/
  • http://blogs.yahoo.co.jp/ryu_02801/40450968.html
  • http://norikyu.blogspot.hk/search/label/lin_guider
  • http://norikyu.blogspot.hk/p/raspberry-pi2-linguider.html
 
 

2016年7月24日 星期日

Dither test on M8 & M20

今年好天的日子實在太少,這幾天天氣實在太好,可惜係🌛常伴,但夏天過了一半我還未正式出動過 上年夏天完全交白卷


今晚趁🌛未升起前實行早去早回,正式嘗試影 M8 M20 ,今次是第二次影 M8 M20,上次是初學攝星,用鏡頭影,今次終於可以試用 ED80sf。唉! 不過明天還要一早返工要做灰姑娘。
由於對極太爛 , 加上 dither pixel set 成 7,每次 dither 後都不太穩定,由於已指向目標,不想重新對極,只好 calibrate 的時間長些,再加長 dither settlement time 到 50 秒,最終有十多張 dither frames 使用 =)

從測試結果來看,即使這晚温度高達 30度,D5300 的 dark noise 真的不算多,再受惠於低 iso 下擁有極低 readout noise , 沒有 Dark frame 的情況下和 sigma clip 之後,亦不見有大結構的 pattern noise , 以價錢來看 D5300 是一部超值的 astro dslr.。

M8, M20 (Singal Frame)
ED 80sf, 4 min @ iso 400



Nikon D5300, Vixen ED80sf with reducer and LPS D1 filter 25 x 2 min @ iso 400, flat and bias (No dark) with Raspberry pi3 auto guiding


25 x 2 min @ iso 400 (Ver.1)


25 x 2 min @ iso 400 (Ver.2)

PixInsight version (with dark frames)





最後當然要和星友們响美麗的星空下合照