Author Topic: Astronomy Page Sun Spot image  (Read 2457 times)

0 Members and 1 Guest are viewing this topic.

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Astronomy Page Sun Spot image
« on: December 08, 2013, 11:19:23 AM »
For some reason my sunspot image is not showing up. Here is a link to my page. I am not sure who wrote the script though.

http://www.chucksweather.com/wxastronomy.php

Chuck

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2432
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: Astronomy Page Sun Spot image
« Reply #1 on: December 08, 2013, 01:36:57 PM »
It's not directly your problem.  It has to do with NASA no longer using that image as a link.

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Astronomy Page Sun Spot image
« Reply #2 on: December 08, 2013, 01:46:02 PM »
My image is found here in 'include-wxastronomy.php':
Code: [Select]
// SUN: images available from: NASA Goddard Space Flight Center (128x128)      .
   $sunURL  = 'http://umbra.nascom.nasa.gov/images/';
and my Sun Image is
Code: [Select]
  // pick your sun image from one of the above choices
   $sunImg = $sunK128;
The choices I have in 'include-wxastronomy.php' are:
Code: [Select]
  $sunA128 = array('latest_aia_171_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_aia_171.gif');   // Fe IX, X 171 Å (blue   ... sun spots and flares)
   $sunB128 = array('latest_aia_193_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_aia_193.gif');   // Fe XII 193 Å   (green  ... sun spots and flares)
   $sunC128 = array('latest_aia_211_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_aia_211.gif');   // Fe XV 211 Å    (yellow ... sun spots and flares)
   $sunD128 = array('latest_aia_304_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_aia_304.gif');   // He II 304 Å    (orange ... sun spots and flares)
   $sunE128 = array('latest_xrt_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_xrt.gif');              // Soft X-ray image in the titanium-polyimide
   $sunF128 = array('latest_solisMG_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_solisMG.gif');   // Photospheric longitudinal magnetograms (gray  )
   $sunG128 = array('latest_solisHe_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_solisHe.gif');   // He I 10830 Å spectroheliograms         (orange)
   $sunH128 = array('latest_solisCh_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_solisCh.gif');   // Ca II 8542 Å longitudinal magnetograms (red   )
   $sunI128 = array('latest_K_line_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_K_line.gif');    // RISE/PSPT Ca II K filtergrams          (blue  )
   $sunJ128 = array('latest_mk4_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_mk4.gif');       // White-light Mk. 4 coronameter          (halo  )
   $sunK128 = array('latest_hmi_igram_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_hmi_igram.gif'); // Helioseismic and Magnetic Imager (HMI) (orange ... smooth)
but I won't guarantee the validity of all of the links, just the one I'm using.
« Last Edit: December 08, 2013, 01:49:03 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: Astronomy Page Sun Spot image
« Reply #3 on: December 09, 2013, 12:00:50 AM »
Still not working. I will look at it more in the next couple of days. Felt like crap all day did not work on it to much.

Chuck

Offline DanS

  • Chiang Mai weather
  • Forecaster
  • *****
  • Posts: 5434
    • ThaiWx
Re: Astronomy Page Sun Spot image
« Reply #4 on: December 09, 2013, 02:17:51 AM »
Spaceweather-dot-com has a nice one that's updated frequently if you want to try a different one.
Hope you're feeling better soon.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Astronomy Page Sun Spot image
« Reply #5 on: December 09, 2013, 08:23:24 AM »
Spaceweather-dot-com has a nice one that's updated frequently if you want to try a different one.
Nice image.  Is there a thumbnail, Dan?  Loading such a large image just to squeeze it down to thumbnail size seems wasteful of time and bandwidth.  As now, the large image could then be linked to the thumbnail.

Nevermind...I found the thumbnail on their site.  These image urls are coded with the date, so to obtain the most recent one would require coding the date information into the url.  I'll think about doing this just for kicks.
« Last Edit: December 09, 2013, 08:30:44 AM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Astronomy Page Sun Spot image
« Reply #6 on: December 09, 2013, 09:36:18 AM »
Here is code that displays the Spaceweather.com sunspot image.  In 'include-wxastronomy.php' substitute this section (shown in context):
Code: [Select]
// -----------------------------------------------------------------------------
// SUN: images available from: NASA Goddard Space Flight Center (128x128)
// OR from Spaceweather.com 
date_default_timezone_set("US/Eastern"); # Spaceweather.com url needs these
$yrmoday = date("YMd"); // Today as 'yyyymondd'
date_default_timezone_set($SITE['tz']); # Reset 'tz' to default
$yr4 = substr($yrmoday,0,4);
$yr2 = substr($yr4,2,2);
$mo = strtolower(substr($yrmoday,4,3));
$today = substr($yrmoday,7,2);
// End Spaceweather.com calculations

   $sunSW = array($today.$mo.$yr2.'/hmi200.gif',
   'http://spaceweather.com/images'.$yr4.'/'.$today.$mo.$yr2.'/hmi4096_blank.jpg'); // Spaceweather rendition
   $sunA128 = array('latest_aia_171_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_aia_171.gif');   // Fe IX, X 171 Å (blue   ... sun spots and flares)
   $sunB128 = array('latest_aia_193_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_aia_193.gif');   // Fe XII 193 Å   (green  ... sun spots and flares)
   $sunC128 = array('latest_aia_211_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_aia_211.gif');   // Fe XV 211 Å    (yellow ... sun spots and flares)
   $sunD128 = array('latest_aia_304_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_aia_304.gif');   // He II 304 Å    (orange ... sun spots and flares)
   $sunE128 = array('latest_xrt_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_xrt.gif');              // Soft X-ray image in the titanium-polyimide
   $sunF128 = array('latest_solisMG_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_solisMG.gif');   // Photospheric longitudinal magnetograms (gray  )
   $sunG128 = array('latest_solisHe_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_solisHe.gif');   // He I 10830 Å spectroheliograms         (orange)
   $sunH128 = array('latest_solisCh_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_solisCh.gif');   // Ca II 8542 Å longitudinal magnetograms (red   )
   $sunI128 = array('latest_K_line_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_K_line.gif');    // RISE/PSPT Ca II K filtergrams          (blue  )
   $sunJ128 = array('latest_mk4_thumbnail.gif',
     'http://umbra.nascom.nasa.gov/images/latest_mk4.gif');       // White-light Mk. 4 coronameter          (halo  )
   $sunK128 = array('latest_hmi_igram_tn.gif',
     'http://umbra.nascom.nasa.gov/images/latest_hmi_igram.gif'); // Helioseismic and Magnetic Imager (HMI) (orange ... smooth)
   // pick your sun image from one of the above choices
   $sunImg = $sunSW;
   if ($sunImg == $sunSW) {
$sunURL  = 'http://spaceweather.com/images'.$yr4.'/'; // Spaceweather rendition
} else {
   $sunURL  = 'http://umbra.nascom.nasa.gov/images/';
}

// -----------------------------------------------------------------------------
// EARTH: images available from: Fourmilab Switzerland (200x200)               .
// -----------------------------------------------------------------------------
and this section (again shown in context):
Code: [Select]
      <!-- SUN IMAGE -->
      <td align="center">
         <?php if ($sunImg == $sunSW) { ?>
<b><a href="http://spaceweather.com/" target="_blank" title="Off Site" style="color:#FF0000;"><?php echo langtransstr("Sun Spots"); ?></a></b><br />
         <?php } else { ?>
<b style="color:#FF0000;"><?php echo langtransstr("Sun Spots"); ?></b><br />
<?php }?>
         <a href="<?php echo $sunImg[1]?>" target="_blank">
          <img border="0" src="<?php echo $sunURL.$sunImg[0?>" width="120" height="120"
              alt  ="<?php echo langtransstr('Sun Spots'); ?>"
              title="<?php echo langtransstr('Click for Larger Sun Spots Image'); ?>"/></a><br />
      </td>
      <!-- EARTH IMAGE -->
I've added a link to the Spaceweather.com site in the 'Sun Spots' title over the thumbnail.
(My apologies for the formatting--I use tab2, and it gets messy here.)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: Astronomy Page Sun Spot image
« Reply #7 on: December 10, 2013, 12:06:20 AM »
Got it working! Thanks for the assistance gwwilk, very much appreciated.

Chuck

 

anything