Jump to content

Wikipedia:Reference desk/Archives/Miscellaneous/2023 June 19

From Wikipedia, the free encyclopedia
Miscellaneous desk
< June 18 << May | June | Jul >> Current desk >
Welcome to the Wikipedia Miscellaneous Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


June 19

[edit]

Color conversion formula with respect to sea temperature.

[edit]

The climate chapters of some articles have templates for sea temperature, for example New York City, Detroit, and Tromsø, Norway. But I don't know what is the formula for converting the input temperature value to the output color value? Fumikas Sagisavas (talk) 04:01, 19 June 2023 (UTC)[reply]

I can't figure it out either. This seems to be user:D.Nino doing something idiosyncratic. They are color values put directly into tables. Template:Weather box, on the other hand, uses Module:Weather box/colors. It would be logical to make use of that, but here's what I get if I input the sea temperature values for New York City, January to July:
5.44.34.57.311.418.122.3
This doesn't match. The high value is orange alright (too orange, I think) but the low value isn't blue.
I thought maybe it's some simple gimmick like subtracting a value, so I tried subtracting 29:
5.44.34.57.311.418.122.3
This still doesn't match. I guess there's a formula where the input value is multiplied by something, and then something is subtracted, and then the result is fed into the Lua to get the color value.
On closer inspection, I don't think it's possible to get the color used there for June (#FFE9A1) using the Lua color_t function: it hasn't got enough blue in it. The color_t function produces something like #FFE9D4 as the closest match. So I don't know what function's being used, maybe it's only an imitation of the color_t function.
However, multiplying by 3 and subtracting 45 gives results which are close (I included August this time):
5.44.34.57.311.418.122.323.4
Pretty much as required apart from the 18.1 (June) color value.
By the way, I had trouble understanding how _temperature_color() works until I learned that .. in Lua means string concatenation. So it's in three stages: first it chooses the two hex digits for R, then it appends the G, then it appends the B.  Card Zero  (talk) 14:58, 19 June 2023 (UTC)[reply]
Why should Detroit have a "sea temperature" template? Detroit is located on a freshwater river, hundreds of miles from the Atlantic Ocean. Cullen328 (talk) 18:00, 19 June 2023 (UTC)[reply]
Change it to say water temperature then. Lots of places are on water but not on the ocean, there's no need to say a river isn't important enough for the climate box when the information is available. Sagittarian Milky Way (talk) 19:01, 19 June 2023 (UTC)[reply]
It makes sense for the color to be different cause the range is smaller. Even the saltiest ocean water (which is usually the hot, dry inland parts like Israel in summer) would get ice crust by about minus 2C and the coldest possible NaCl brine is -21.1C while a weather station has seen minus 89.2C. In non-hurricane desiccating zones the sea has (so far) never been much above 30 and anywhere in the world has only been about as hot as a male rectum (hot desert sea). I don't know what's the record hot lakewater, riverwater or water body in general temp but since water has more thermal inertia than land and air and cools and humidifies any nearby desert it's probably not even 54C (which has happened in air). Sagittarian Milky Way (talk) 18:40, 19 June 2023 (UTC)[reply]


Hope this helps:

	function hex( $value )
	{
		return sprintf( "%02X", $value );
	}


	function range_pos( $value, $start, $stop )
	{
		if ( $start < $stop )
		{
			if ( $value < $start )
			{
				return 0;
			}
			elseif ( $value > $stop )
			{
				return 1;
			}
			else
			{
				return ( $value - $start ) / ( $stop - $start );
			}
		}
		else
		{
			if ( $value < $stop )
			{
				return 1;
			}
			elseif ( $value > $start )
			{
				return 0;
			}
			else
			{
				return ( $start - $value ) / ( $start - $stop );
			}
		}
	}


	function sea_color( $val )
	{
		$item       = "";
		$background = "";
		$text_color = "";
		if ( $val < 17 )
		{
			$item       = range_pos( $val, 0, 17 ) * 255;
			$background = hex( $item );
		}
		else
		{
			$item       = range_pos( $val, 60, 30 ) * 255;
			$background = hex( $item );
		}
		if ( $val <= 17 )
		{
			$item       = range_pos( $val, 0, 17 ) * 255;
			$background = $background . hex( $item );
		}
		else
		{
			$item       = range_pos( $val, 30, 17 ) * 255;
			$background = $background . hex( $item );
		}
		if ( $val < 17 )
		{
			$item       = range_pos( $val, - 17, 0 ) * 255;
			$background = $background . hex( $item );
		}
		else
		{
			$item       = range_pos( $val, 20, 17 ) * 255;
			$background = $background . hex( $item );
		}
		if ( $val <= 7 OR $val >= 27 )
		{
			$text_color = "FFFFFF";
		}
		else
		{
			$text_color = "000000";
		}
		return array (
			"#" . $background,
			"#" . $text_color
		);
	}


list( $background, $text_color ) = sea_color ( $val );

Note: temp ( $val ) is in C

--D.Nino (talk) 21:14, 19 June 2023 (UTC)[reply]

@D.Nino: In addition, can you create a watertemperature template, you can refer to the weatherbox template, because I don't know the Lua language. Thanks! Fumikas Sagisavas (talk) 09:51, 20 June 2023 (UTC)[reply]
In addition, a distinction needs to be made between fresh water temperature (rivers, lakes) and sea water temperature. Fumikas Sagisavas (talk) 09:52, 20 June 2023 (UTC)[reply]

Suspicion of Josef Mengele's alleged death

[edit]
Mengele's name was mentioned several times during the Nuremberg trials in the mid-1940s, but the Allied forces believed that he was probably already dead. Irene Mengele and the family in Günzburg also alleged that he had died. Working in West Germany, Nazi hunters Simon Wiesenthal and Hermann Langbein collected information from witnesses about Mengele's wartime activities. In a search of the public records, Langbein discovered Mengele's divorce papers, which listed an address in Buenos Aires.

This whole story sounds odd to me. Why would the allied forces have assumed he was dead? Viriditas (talk) 08:44, 19 June 2023 (UTC)[reply]

Have you followed up the citation in the article and read the reference work to which the statement is sourced? {The poster formerly known as 87.81.230.195} 46.65.228.117 (talk) 09:22, 19 June 2023 (UTC)[reply]
Posner & Ware 1986a, pp. 76, 82. It says Mengele's father and spouse convinced the American authorities he was dead. The author argues that the case stopped there. The author also goes on to say that a former employee of Mengele's, Dr. Gisella Perl, a gynecologist at Auschwitz, tried desperately to convince the authorities of Mengele's many crimes, but was mostly ignored by US authorities. This lack of communication seems to have contributed to the failure of the counsel at Nuremberg to cross-check reports of his death, attributed to a mistaken finding of an official in the Locator and Apprehension Branch in Nuremberg, which was relayed to the US--all of which is attributed by the author to the combined efforts of Mengele's father and spouse. It sounds quite far-fetched, that an important Nazi asset like Mengele was assumed dead without any serious verification, and blamed on his family. Very odd. Viriditas (talk) 09:59, 19 June 2023 (UTC)[reply]
You find this far-fatched, as it happens, I don't: both are personal reactions. I have no referenced facts, but I see the aftermath of WW2 as a time of chaos, confusion, and greatly overstretched human and organisational resources, where it would be quite understandable for harrassed officials to accept allegations, no less credible than many others they were dealing with, at face value and move onto the next nightmare.
Mengele's case later assumed greater significance precisely because he was belatedly perceived as having slipped through the net, and because the nature and extent of his crimes had become more apparent, but at the time he was just one more on a very long list of alleged and actual, alive and dead, possibly alive and probably dead, war criminals. Dealing with them was, of course, not unimportant, but in most individual and goverment minds probably had less priority than rebuilding shattered national economies and infrastructures, and dealing with millions of refugees and other displaced persons. {The poster formerly known as 87.81.230.195} 46.65.228.117 (talk) 07:24, 21 June 2023 (UTC)[reply]
Might there also have been legal issues pursuing him into South America? ←Baseball Bugs What's up, Doc? carrots10:21, 21 June 2023 (UTC)[reply]
Undoubtably, once it was realised that he probably wasn't dead and was probably in South America, but the OP is querying why initially the relevant Allied authorities accepted the (false) reports that he was dead. {The poster formerly known as 87.81.230.195} 46.65.228.117 (talk) 12:52, 21 June 2023 (UTC)[reply]
According to our article, Mengele visited Germany — using a passport showing his real name — in 1956. Of course that was before these things were largely computerized, but still, no one noticed that name? Did his notoriety perhaps come later, as a result of Wiesenthal's efforts or something? --Trovatore (talk) 19:44, 21 June 2023 (UTC)[reply]
The article makes it fairly clear that the authorities at that time thought he was dead (so he probably wasn't included on any relevant watch lists), and 'Mengele', though not a common surname, is not unique. It's also possible that if any German official did realise who he was, they might not have wanted to draw attention to him – many Germans remained passively sympathetic to nazism or at least didn't want to actively aid the occupying Allied powers (I speak as one who briefly lived in West Germany in the '70s). Weisenthal's efforts indeed only succeeded in reviving interest in pursuing him from 1959 onwards. {The poster formerly known as 87.81.230.195} 46.65.228.117 (talk) 01:06, 22 June 2023 (UTC)[reply]