ericmandel / js9

astronomical image display everywhere
https://js9.si.edu
Other
121 stars 50 forks source link

Displaying 6k x 6k images #57

Closed briehanlombaard closed 5 years ago

briehanlombaard commented 5 years ago

Hi Eric,

We need to be able to display images that are (roughly) up to 6144 x 6144 pixels but I see that JS9 only displays 4096 x 4096 of the image. The documentation on memory limitations mentions changing JS9.globalOpts.image. Setting x and y on that doesn't seem to work.

Any ideas what I could be doing wrong?

ericmandel commented 5 years ago

Hi Briehan, Both of these work for me:

# override the dimension limits in the Load command:
JS9.Load("../data/f814w.fits.gz", {xdim:10000,ydim:10000})

and

# change the limits in js9prefs.son
var JS9Prefs = {
  "globalOpts": {"helperType":       "nodejs",
         "helperPort":       2718, 
         "helperCGI":        "./cgi-bin/js9/js9Helper.cgi",
         "fits2png":         false,
         "debug":        0,
         "loadProxy":        true,
         "workDir":      "./tmp",
         "workDirQuota":     100,
         "dataPath":         "$HOME/Desktop:$HOME/data",
         "analysisPlugins":  "./analysis-plugins",
         "analysisWrappers": "./analysis-wrappers",
                 "image":             {xdim: 10000, ydim: 10000, bin: 1}
                },
  "imageOpts":  {"colormap":         "grey",
         "scale":            "linear"}
}

JS9.Load("../data/f814w.fits.gz")

I assume you are doing the latter. What is the value of JS9.globalOpts.image once JS9 is ready?

Any chance you have an old value set and saved in your preference plugin?

briehanlombaard commented 5 years ago

Sorry Eric, I seem to have declared the override in the wrong place. It works perfectly now.

ericmandel commented 5 years ago

OK, that's better than a bug!

An important side note: be aware that Chrome will eventually start 'aw snap'ing if your images get too large, since it has a per-tab memory limit (2Gb or 4Gb, I forget, but it's real). I'm pretty sure FF does not have the same limit. If you trip over that problem (and depending on what you are trying to do), there is 'large file' support in place to extract and display a section of a huge image ... it's a work in progress, so let me know if you bump into memory issues.

briehanlombaard commented 5 years ago

Thanks. I'll definitely keep any eye out for that.