JuliaAstro / SAOImageDS9.jl

A Julia interface to SAOImage/DS9 and XPA messaging system
Other
5 stars 1 forks source link

DS9 REPL Mode #3

Open mileslucas opened 3 years ago

mileslucas commented 3 years ago

I've had this neat idea of creating a REPL mode for DS9. The idea is that, instead of writing something like this-

julia> DS9.connect()
"7f000001:59505"

julia> DS9.set("frame new")
julia> X = randn(512, 512);
julia> DS9.set(X)

you could do this-

julia>|
DS9> connect
"7f000001:59505"

DS9> set frame new
DS9> set X

Creating custom REPL modes can be done with something like REPLMaker, so the questions would just be

If this sounds interesting, I'd like to slowly incorporate this into a PR. It is mostly just expression parsing, so we could create a macro system like ds9"frame new" which would include all the logic we need for the REPL.

emmt commented 3 years ago

I really like this. You may want to show the current DS9 frame number in the prompt (and perhaps the server address if there are several ones running).