Hola,
bueno pues esto es un previo del script del que hablábamos ayer
De momento solamente baja la imagen del DSS y le aplica un estirado de histogramas para que se vea bien. Veréis que se puede seleccionar los catálogos Messier, NGC y IC o introducir unas coordenadas. Después, de momento, hay una opción de modificar el FOV (hasta 120x120 arcmin). Un par de screenshots para ver como va, primero el menú:
English version below despues el resultado
Bueno, problemas que tenemos:
- De momento el script solamente va en
Linux- El DSS solo da como máximo 120 x 120 arcmin, asi que pensamos usar el Star alignement para generar mosaicos para casos de mas resolución.
Cosas que queremos poner:
- Calculo de efemérides.
- Objetos por temporada (verano, primavera...)
- Poder definir un rectángulo que represente una cámara y poderlo rotar para evaluar posibles encuadres .
Que os parece? Alguna otra idea?
Dejamos el script por si ya es de ayuda a alguien
#include <pjsr/Sizer.jsh>
#include <pjsr/FrameStyle.jsh>
#include <pjsr/TextAlign.jsh>
#include <pjsr/StdButton.jsh>
#include <pjsr/StdIcon.jsh>
#include <pjsr/UndoFlag.jsh>
#include <pjsr/ColorSpace.jsh>
#include <pjsr/NumericControl.jsh>
var catalog = new Array;
catalog [0] = "UserDefined";
catalog [1] = "M";
catalog [2] = "NGC";
catalog [3] = "IC";
function showImage(data) {
console.show();
if(!data.north) data.dec_h = data.dec_h*(-1);
if(data.catalog) console.execute("!wget http://archive.eso.org/dss/dss/image?name="+catalog[data.catalog]+data.id+"&equinox=J2000&x="+data.fovX+"&y="+data.fovY+"&Sky-Survey=DSS1&mime-type=display/gz-fits -O /tmp/image.fits ");
else console.execute("!wget http://archive.eso.org/dss/dss/image?ra="+data.ra_h+"+"+data.ra_min+"+"+data.ra_sec+"&dec="+data.dec_h+"+"+data.dec_min+"+"+data.dec_sec+"&equinox=J2000&x="+data.fovX+"&y="+data.fovY+"&Sky-Survey=DSS1&mime-type=display/gz-fits -O /tmp/image.fits ");
var image = ImageWindow.open("/tmp/image.fits");
var view = image[0].mainView;
var at = new AutoHistogram;
with ( at )
{
clipLowR = 0.100;
clipHighR = 0.000;
medianR = 0.70000000;
clipLowG = 0.100;
clipHighG = 0.000;
medianG = 0.70000000;
clipLowB = 0.100;
clipHighB = 0.000;
medianB = 0.70000000;
isHistogramClipEnabled = true;
isGammaEnabled = true;
isGlobalHistogramClip = false;
isGlobalGamma = false;
}
view.beginProcess(UndoFlag_NoSwapFile);
at.executeOn(view);
view.endProcess();
image[0].show();
}
function SessionPlanerSkinData()
{
this.catalog = 1;
this.id = 1;
this.fovX = 60;
this.fovY = 60;
this.ra_h = 1;
this.ra_min = 1;
this.ra_sec = 1;
this.dec_h = 1;
this.dec_min = 1;
this.dec_sec = 1;
this.north = true;
}
var data = new SessionPlanerSkinData;
function SessionPlanerSkinDialog()
{
this.__base__ = Dialog;
this.__base__();
var emWidth = this.font.width( 'M' );
var labelWidth1 = this.font.width( "Amount:" );
this.helpLabel = new Label( this );
this.helpLabel.frameStyle = FrameStyle_Box;
this.helpLabel.margin = 4;
this.helpLabel.wordWrapping = true;
this.helpLabel.useRichText = true;
this.helpLabel.text = "<p><b>Session Planer Script</b> - A simple script to download DSS images." +
"It can be useful for planning deep sky framings.</p>"+
"<p><i> This is a beta version, only for Linux OS </i></p>"+
"<p>Written by Ivette Rodríguez and Oriol Lehmkuhl, 2008</p>";
// Target object specifications
this.catalog_Label = new Label( this );
this.catalog_Label.text = "Object name:";
this.catalog_Label.textAlignment = TextAlign_Right|TextAlign_VertCenter;
this.catalog_Label.minWidth = labelWidth1;
this.catalog_ComboBox = new ComboBox( this );
for ( var i = 0; i < catalog.length; ++i )
this.catalog_ComboBox.addItem( catalog[i] );
this.catalog_ComboBox.currentItem = data.catalog;
this.catalog_ComboBox.toolTip = "";
this.catalog_ComboBox.onItemSelected = function( index )
{
data.catalog = index;
if(index==0) {
this.dialog.ra_h_SpinBox.enabled = true;
this.dialog.ra_min_SpinBox.enabled = true;
this.dialog.ra_sec_SpinBox.enabled = true;
this.dialog.dec_h_SpinBox.enabled = true;
this.dialog.dec_min_SpinBox.enabled = true;
this.dialog.dec_sec_SpinBox.enabled = true;
this.dialog.catalog_SpinBox.enabled = false;
} else {
this.dialog.ra_h_SpinBox.enabled = false;
this.dialog.ra_min_SpinBox.enabled = false;
this.dialog.ra_sec_SpinBox.enabled = false;
this.dialog.dec_h_SpinBox.enabled = false;
this.dialog.dec_min_SpinBox.enabled = false;
this.dialog.dec_sec_SpinBox.enabled = false;
this.dialog.catalog_SpinBox.enabled = true;
}
switch(index) {
case 1:
this.dialog.catalog_SpinBox.maxValue = 110;
break;
case 2:
this.dialog.catalog_SpinBox.maxValue = 7840;
break;
case 3:
this.dialog.catalog_SpinBox.maxValue = 5386;
break;
default:
break;
}
};
this.catalog_SpinBox = new SpinBox( this );
this.catalog_SpinBox.minValue = 1;
this.catalog_SpinBox.maxValue = 120;
this.catalog_SpinBox.value = data.id;
this.catalog_SpinBox.toolTip = "";
this.catalog_SpinBox.enabled = true;
this.catalog_SpinBox.onValueUpdated = function( value )
{
data.id = value;
};
this.catalog_Sizer = new HorizontalSizer;
this.catalog_Sizer.spacing = 4;
this.catalog_Sizer.add( this.catalog_Label );
this.catalog_Sizer.add( this.catalog_ComboBox, 100 );
this.catalog_Sizer.add( this.catalog_SpinBox);
// RA
this.ra_Label = new Label( this );
this.ra_Label.text = "RA:";
this.ra_Label.textAlignment = TextAlign_Right|TextAlign_VertCenter;
this.ra_Label.minWidth = labelWidth1;
this.ra_h_SpinBox = new SpinBox( this );
this.ra_h_SpinBox.minValue = 0;
this.ra_h_SpinBox.maxValue = 23;
this.ra_h_SpinBox.value = data.ra_h;
this.ra_h_SpinBox.toolTip = "";
this.ra_h_SpinBox.enabled = false;
this.ra_h_SpinBox.onValueUpdated = function( value )
{
data.ra_h = value;
};
this.ra_min_SpinBox = new SpinBox( this );
this.ra_min_SpinBox.minValue = 0;
this.ra_min_SpinBox.maxValue = 59;
this.ra_min_SpinBox.value = data.ra_min;
this.ra_min_SpinBox.toolTip = "";
this.ra_min_SpinBox.enabled = false;
this.ra_min_SpinBox.onValueUpdated = function( value )
{
data.ra_min = value;
};
this.ra_sec_SpinBox = new SpinBox( this );
this.ra_sec_SpinBox.minValue = 0;
this.ra_sec_SpinBox.maxValue = 59;
this.ra_sec_SpinBox.value = data.ra_sec;
this.ra_sec_SpinBox.toolTip = "";
this.ra_sec_SpinBox.enabled = false;
this.ra_sec_SpinBox.onValueUpdated = function( value )
{
data.ra_sec = value;
};
this.ra_Sizer = new HorizontalSizer;
this.ra_Sizer.spacing = 4;
this.ra_Sizer.add( this.ra_Label );
this.ra_Sizer.add( this.ra_h_SpinBox );
this.ra_Sizer.add( this.ra_min_SpinBox );
this.ra_Sizer.add( this.ra_sec_SpinBox );
// DEC
this.isNorth_CheckBox = new CheckBox(this);
this.isNorth_CheckBox.text = "is South";
this.isNorth_CheckBox.checked = !data.north;
this.isNorth_CheckBox.toolTip = "";
this.isNorth_CheckBox.onCheck = function( checked )
{
data.north = !checked;
};
this.dec_Label = new Label( this );
this.dec_Label.text = "DEC:";
this.dec_Label.textAlignment = TextAlign_Right|TextAlign_VertCenter;
this.dec_Label.minWidth = labelWidth1;
this.dec_h_SpinBox = new SpinBox( this );
this.dec_h_SpinBox.minValue = 0;
this.dec_h_SpinBox.maxValue = 90;
this.dec_h_SpinBox.value = data.dec_h;
this.dec_h_SpinBox.toolTip = "";
this.dec_h_SpinBox.enabled = false;
this.dec_h_SpinBox.onValueUpdated = function( value )
{
data.dec_h = value;
};
this.dec_min_SpinBox = new SpinBox( this );
this.dec_min_SpinBox.minValue = 0;
this.dec_min_SpinBox.maxValue = 59;
this.dec_min_SpinBox.value = data.dec_min;
this.dec_min_SpinBox.toolTip = "";
this.dec_min_SpinBox.enabled = false;
this.dec_min_SpinBox.onValueUpdated = function( value )
{
data.dec_min = value;
};
this.dec_sec_SpinBox = new SpinBox( this );
this.dec_sec_SpinBox.minValue = 0;
this.dec_sec_SpinBox.maxValue = 59;
this.dec_sec_SpinBox.value = data.dec_sec;
this.dec_sec_SpinBox.toolTip = "";
this.dec_sec_SpinBox.enabled = false;
this.dec_sec_SpinBox.onValueUpdated = function( value )
{
data.dec_sec = value;
};
this.dec_Sizer = new HorizontalSizer;
this.dec_Sizer.spacing = 4;
this.dec_Sizer.add( this.isNorth_CheckBox );
this.dec_Sizer.add( this.dec_Label );
this.dec_Sizer.add( this.dec_h_SpinBox );
this.dec_Sizer.add( this.dec_min_SpinBox );
this.dec_Sizer.add( this.dec_sec_SpinBox );
this.dmParGroupBox = new GroupBox( this );
this.dmParGroupBox.title = "Target Selection:";
this.dmParGroupBox.sizer = new VerticalSizer;
this.dmParGroupBox.sizer.margin = 4;
this.dmParGroupBox.sizer.spacing = 4;
this.dmParGroupBox.sizer.add( this.catalog_Sizer );
this.dmParGroupBox.sizer.add( this.ra_Sizer );
this.dmParGroupBox.sizer.add( this.dec_Sizer );
// Eyepice options
this.fovX_Label = new Label( this );
this.fovX_Label.text = "X field of view [arcmin]:";
this.fovX_Label.textAlignment = TextAlign_Right|TextAlign_VertCenter;
this.fovX_Label.minWidth = labelWidth1;
this.fovX_SpinBox = new SpinBox( this );
this.fovX_SpinBox.minValue = 1;
this.fovX_SpinBox.maxValue = 120;
this.fovX_SpinBox.value = data.fovX;
this.fovX_SpinBox.toolTip = "";
this.fovX_SpinBox.onValueUpdated = function( value )
{
data.fovX = value;
};
this.fovX_Sizer = new HorizontalSizer;
this.fovX_Sizer.spacing = 4;
this.fovX_Sizer.add( this.fovX_Label );
this.fovX_Sizer.add( this.fovX_SpinBox );
this.fovX_Sizer.addStretch();
this.fovY_Label = new Label( this );
this.fovY_Label.text = "Y field of view [arcmin]:";
this.fovY_Label.textAlignment = TextAlign_Right|TextAlign_VertCenter;
this.fovY_Label.minWidth = labelWidth1;
this.fovY_SpinBox = new SpinBox( this );
this.fovY_SpinBox.minValue = 1;
this.fovY_SpinBox.maxValue = 120;
this.fovY_SpinBox.value = data.fovY;
this.fovY_SpinBox.toolTip = "";
this.fovY_SpinBox.onValueUpdated = function( value )
{
data.fovY = value;
};
this.fovY_Sizer = new HorizontalSizer;
this.fovY_Sizer.spacing = 4;
this.fovY_Sizer.add( this.fovY_Label );
this.fovY_Sizer.add( this.fovY_SpinBox );
this.fovY_Sizer.addStretch();
this.dseParGroupBox = new GroupBox( this );
this.dseParGroupBox.title = "Eyepice Options:";
this.dseParGroupBox.sizer = new VerticalSizer;
this.dseParGroupBox.sizer.margin = 4;
this.dseParGroupBox.sizer.spacing = 4;
this.dseParGroupBox.sizer.add( this.fovX_Sizer );
this.dseParGroupBox.sizer.add( this.fovY_Sizer );
// usual control buttons
this.ok_Button = new PushButton( this );
this.ok_Button.text = " OK ";
this.ok_Button.onClick = function()
{
this.dialog.ok();
};
this.cancel_Button = new PushButton( this );
this.cancel_Button.text = " Cancel ";
this.cancel_Button.onClick = function()
{
this.dialog.cancel();
};
this.buttons_Sizer = new HorizontalSizer;
this.buttons_Sizer.spacing = 4;
this.buttons_Sizer.addStretch();
this.buttons_Sizer.add( this.ok_Button );
this.buttons_Sizer.add( this.cancel_Button );
this.sizer = new VerticalSizer;
this.sizer.margin = 6;
this.sizer.spacing = 6;
this.sizer.add( this.helpLabel );
this.sizer.addSpacing( 4 );
this.sizer.add( this.dmParGroupBox);
this.sizer.add( this.dseParGroupBox);
this.sizer.add( this.buttons_Sizer );
this.windowTitle = "Session Planer Script";
this.adjustToContents();
this.setFixedSize();
}
SessionPlanerSkinDialog.prototype = new Dialog;
/*
* Script entry point.
*/
function main()
{
console.hide();
var dialog = new SessionPlanerSkinDialog();
for ( ;; )
{
if ( !dialog.execute() )
break;
// main routine.
showImage( data );
// Quit after successful execution.
break;
}
}
main();
This is a preview of the script we were talking yesterday. At this time, it is only capable of download an image from DSS (Deep Sky Survay) and stretch its histogram. As you can see, it is possible to select images from Messier, NGC and IC Catalogues or introduce the coordinates instead. The field of view of the image is limited up to 120'x120'. Here you have a couple of screenshots, to see how it works. The menu and the results.
Some items to solve
- The script works only in Linux Platform,
- Images from DSS are limited to 120x120', so we're planning use star alignment for mosaics
Things to do:
- Include ephemeris
- Season clasification of objects
- Define the eye piece and possibility of its rotation for framing