Giter VIP home page Giter VIP logo

Comments (12)

ericmandel avatar ericmandel commented on August 16, 2024 2

OK, I can look at what Bill is doing in DS9, I imagine he wrote code to manually matches things up in various ways ... I was trying to leverage code from the mosaic experts ... let me have a look, if it's relatively straightforward, I can add it to JS9 (but not immediately).

from js9.

ericmandel avatar ericmandel commented on August 16, 2024 1

Hi @jllamas I can look at this in more detail in the next day or so, but since you have caltech in your box.com address, I'll mention that I'm using the JPL Mosaic code to create the mosaic, and the first routine that gets called, mImgtbl, is not finding any extensions in this file to its liking. What I have to do is run the program suite outside JS9 and see if I can create a mosaic that way ... and go from there. But if you are familiar with Mosaic, you might try running mImgtbl -C and see what you get ...

from js9.

ericmandel avatar ericmandel commented on August 16, 2024

Running mImgtbl on your FITS file outside of js9 shows that the program does not like the PANE_X value for CTYPE1 in any of the extensions:

eric% mImgtbl -d -C test images.tbl
DEBUG: path = [test](5)
DEBUG: Opening path    [test]
DEBUG:  entry [.]
DEBUG: [test/.] -> [.]
DEBUG:  entry [..]
DEBUG: [test/..] -> [..]
DEBUG:  entry [j3350447.fits]
DEBUG: [test/j3350447.fits] -> [j3350447.fits]
DEBUG: Found file      [test/j3350447.fits]
DEBUG> file = "test/j3350447.fits"
DEBUG> file size = 17686080
DEBUG> hdu  = 1
Missing CTYPE1 in file test/j3350447.fits
DEBUG> hdu  = 2
DEBUG> CTYPE1 check: ['PANE_X  '] badhdr -> 0
Invalid CTYPE1 in file test/j3350447.fits
DEBUG> hdu  = 3
DEBUG> CTYPE1 check: ['PANE_X  '] badhdr -> 0
Invalid CTYPE1 in file test/j3350447.fits
DEBUG> hdu  = 4
DEBUG> CTYPE1 check: ['PANE_X  '] badhdr -> 0
Invalid CTYPE1 in file test/j3350447.fits
[struct stat="OK", count=0, nfile=1, nhdu=4, badfits=0, badwcs=4]

Can I assume you're able to generate a mosaic in DS9? If so, can you please tell me how you do it? It's been a long time since I've done that in DS9 ...

from js9.

bjfultn avatar bjfultn commented on August 16, 2024

We can open the image as a mosaic in ds9 with the -mosaicimage flag.

e.g. ds9 -mosaicimage wcs -geometry 1000x1200 -zscale -single -zoom to fit -match FRAME IMAGE j3350446.fits

from js9.

bjfultn avatar bjfultn commented on August 16, 2024

ds9 -mosaicimage iraf also appears to work in exactly the same way as far as I can tell.

from js9.

bjfultn avatar bjfultn commented on August 16, 2024

I heard rumors about Montage integration with JS9 from some co-workers at IPAC. This isn't exactly what we need, but I'm wondering if this has helped our cause on this issue? Is there a new version we should try out?

from js9.

ericmandel avatar ericmandel commented on August 16, 2024

@bjfultn Your issue often is literally the only email in my inbox. It doesn't look like Montage can deal with your header and, although I poked around DS9, the C++ code was hard to follow. What I need is a C program that will create the mosaic based on your header. Does anything like that exist, other than DS9?

from js9.

bjfultn avatar bjfultn commented on August 16, 2024

I don't know of any C code that can do that. Perhaps something buried in IRAF?

I could quickly write something in Python to do it.

from js9.

ericmandel avatar ericmandel commented on August 16, 2024

Oh Lord, please don't make me go back to SPP code ...

Actually, a Python routine that could be executed on the command line might be a really interesting idea: assuming you have configured the js9 server-side helper, you can add an analysis task to the Analysis menu for generate the mosaic. It give you complete control over the mosaic generation, and save me from trying to write bespoke code at a distance for your project.

If you're interested, you can look at:

https://js9.si.edu/js9/help/serverside.html

You basically add the mosaic analysis definition to your own analysis-plugins/mosaic.json, which would be akin to the evfilter routine in js9Analysis-funtools.json (a task that applies an event filter to a binary table, generates new table and displays it):

{"name" : "evfilter",
"title" : "Event Filter",
"files" : "fits",
"purl" : "./params/evfilter.html",
"action" : "js9Xeq evfilter $filename $filter $imcenter $dims",
"pwin" : "width=830px,height=218px,center=1,resize=1,scrolling=1",
"rtype" : "fits"}

You also need an entry in a wrapper script (a security measure) and you can look at analysis-wrappers/js9Xeq to see the evfilter entry, which sends by sending the name of the generated file (actually the gzip'ed version) back to JS9 for display. Presumably you'll just copy js9Xeq, remove all entries except for evfilter, and modify it to fun python instead of funimage.

Let me know if you are interested ...of course, if you just send me the Python code (I don't use Python but ...), I probably can gin up the 2 files you need, but I think its relatively straight-forward.

from js9.

bjfultn avatar bjfultn commented on August 16, 2024

BJ to write script to stitch the images together into a single-extension fits file.

from js9.

github-actions avatar github-actions commented on August 16, 2024

This issue is stale because it has been open for 365 days with no activity.

from js9.

github-actions avatar github-actions commented on August 16, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

from js9.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.